-# signbit.m4 serial 4
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# signbit.m4 serial 6
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[gl_cv_func_copysignf_no_libm=no])
])
if test $gl_cv_func_copysignf_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], 1,
+ AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
[Define if the copysignf function is declared in <math.h> and available in libc.])
fi
fi
[gl_cv_func_copysign_no_libm=no])
])
if test $gl_cv_func_copysign_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], 1,
+ AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
[Define if the copysign function is declared in <math.h> and available in libc.])
fi
fi
[gl_cv_func_copysignl_no_libm=no])
])
if test $gl_cv_func_copysignl_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], 1,
+ AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
[Define if the copysignl function is declared in <math.h> and available in libc.])
fi
fi
])
AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
int main ()
{
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
#else
long double m0l = -p0l;
#endif
+ if (signbit (vf))
+ vf++;
{
float plus_inf = 1.0f / p0f;
float minus_inf = -1.0f / p0f;
&& signbit (minus_inf)))
return 1;
}
+ if (signbit (vd))
+ vd++;
{
double plus_inf = 1.0 / p0d;
double minus_inf = -1.0 / p0d;
&& signbit (minus_inf)))
return 1;
}
+ if (signbit (vl))
+ vl++;
{
long double plus_inf = 1.0L / p0l;
long double minus_inf = -1.0L / p0l;