diff m4/math_h.m4 @ 15908:2f40da163bc2

copysign: Provide replacement. * lib/math.in.h (copysign): New declaration. * lib/copysign.c: New file. * m4/copysign.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether copysign is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGN, HAVE_COPYSIGN. * modules/math (Makefile.am): Substitute GNULIB_COPYSIGN, HAVE_COPYSIGN. * modules/copysign (Description): Clarify. (Files): Add lib/copysign.c, m4/copysign.m4. (Depends-on): Add math, signbit. (configure.ac): Invoke gl_FUNC_COPYSIGN, AC_LIBOBJ, gl_MATH_MODULE_INDICATOR. * tests/test-math-c++.cc: Check the declaration of copysign. * doc/posix-functions/copysign.texi: Mention the effects of the module on Minix and MSVC.
author Bruno Haible <bruno@clisp.org>
date Sun, 09 Oct 2011 14:44:58 +0200 (2011-10-09)
parents 5711969eba55
children bc21ee3c09aa
line wrap: on
line diff
--- a/m4/math_h.m4
+++ b/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 47
+# math_h.m4 serial 48
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,7 @@
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <math.h>]],
-    [acosf acosl asinf asinl atanf atanl ceilf ceill cosf cosl coshf
+    [acosf acosl asinf asinl atanf atanl ceilf ceill copysign cosf cosl coshf
      expf expl fabsf floorf floorl fmodf frexpf frexpl
      ldexpf ldexpl logb logf logl log10f modff powf
      round roundf roundl sinf sinl sinhf sqrtf sqrtl
@@ -67,6 +67,7 @@
   GNULIB_CEIL=0;     AC_SUBST([GNULIB_CEIL])
   GNULIB_CEILF=0;    AC_SUBST([GNULIB_CEILF])
   GNULIB_CEILL=0;    AC_SUBST([GNULIB_CEILL])
+  GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN])
   GNULIB_COSF=0;     AC_SUBST([GNULIB_COSF])
   GNULIB_COSL=0;     AC_SUBST([GNULIB_COSL])
   GNULIB_COSHF=0;    AC_SUBST([GNULIB_COSHF])
@@ -117,6 +118,7 @@
   HAVE_ATANF=1;                AC_SUBST([HAVE_ATANF])
   HAVE_ATANL=1;                AC_SUBST([HAVE_ATANL])
   HAVE_ATAN2F=1;               AC_SUBST([HAVE_ATAN2F])
+  HAVE_COPYSIGN=1;             AC_SUBST([HAVE_COPYSIGN])
   HAVE_COSF=1;                 AC_SUBST([HAVE_COSF])
   HAVE_COSL=1;                 AC_SUBST([HAVE_COSL])
   HAVE_COSHF=1;                AC_SUBST([HAVE_COSHF])