-# truncl.m4 serial 6
-dnl Copyright (C) 2007-2008, 2010 Free Software Foundation, Inc.
+# truncl.m4 serial 8
+dnl Copyright (C) 2007-2008, 2010-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,
dnl with or without modifications, as long as this notice is preserved.
#include <math.h>
]gl_LONG_DOUBLE_MINUS_ZERO_CODE[
]gl_LONG_DOUBLE_SIGNBIT_CODE[
-int main()
+static long double dummy (long double f) { return 0; }
+int main (int argc, char *argv[])
{
+ long double (*my_truncl) (long double) = argc ? truncl : dummy;
/* Test whether truncl (-0.3L) is -0.0L. */
- if (signbitl (minus_zerol) && !signbitl (truncl (-0.3L)))
+ if (signbitl (minus_zerol) && !signbitl (my_truncl (-0.3L)))
return 1;
return 0;
}
HAVE_DECL_TRUNCL=0
fi
if test $HAVE_DECL_TRUNCL = 0 || test $REPLACE_TRUNCL = 1; then
- AC_LIBOBJ([truncl])
+ dnl No libraries are needed to link lib/truncl.c.
TRUNCL_LIBM=
fi
AC_SUBST([TRUNCL_LIBM])