summaryrefslogtreecommitdiff
path: root/m4/trunc.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-07-01 22:34:29 +0200
committerLudovic Courtès <ludo@gnu.org>2011-07-01 22:34:29 +0200
commit231c0e0e61fc4bdd69398e89084b7819f0420710 (patch)
tree097398cd884074bd1d62dfa592fbdd8eda0d9796 /m4/trunc.m4
parent97ec95b72873428f215a8a9892487c3a8435a754 (diff)
Update Gnulib to v0.0-5874-g7170ee0.
Diffstat (limited to 'm4/trunc.m4')
-rw-r--r--m4/trunc.m48
1 files changed, 5 insertions, 3 deletions
diff --git a/m4/trunc.m4 b/m4/trunc.m4
index 953f5b131..62311015b 100644
--- a/m4/trunc.m4
+++ b/m4/trunc.m4
@@ -1,4 +1,4 @@
-# trunc.m4 serial 6
+# trunc.m4 serial 7
dnl Copyright (C) 2007, 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,
@@ -56,10 +56,12 @@ AC_DEFUN([gl_FUNC_TRUNC],
#include <math.h>
]gl_DOUBLE_MINUS_ZERO_CODE[
]gl_DOUBLE_SIGNBIT_CODE[
-int main()
+static double dummy (double f) { return 0; }
+int main (int argc, char *argv[])
{
+ double (*my_trunc) (double) = argc ? trunc : dummy;
/* Test whether trunc (-0.0) is -0.0. */
- if (signbitd (minus_zerod) && !signbitd (trunc (minus_zerod)))
+ if (signbitd (minus_zerod) && !signbitd (my_trunc (minus_zerod)))
return 1;
return 0;
}