X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftrunc.m4;h=62311015b75136d401386c80c39d26e8f07cb581;hb=466449b04ceeb8c245a7e364f9c2c812a5259c8f;hp=6197df5217c57b6c4e457161f9e8d0db4f5a8612;hpb=0c5e7922f80eae16b5a89233d5a8c0d1f88c18a7;p=gnulib.git diff --git a/m4/trunc.m4 b/m4/trunc.m4 index 6197df521..62311015b 100644 --- a/m4/trunc.m4 +++ b/m4/trunc.m4 @@ -1,5 +1,5 @@ -# trunc.m4 serial 5 -dnl Copyright (C) 2007, 2010 Free Software Foundation, Inc. +# 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, dnl with or without modifications, as long as this notice is preserved. @@ -56,10 +56,12 @@ AC_DEFUN([gl_FUNC_TRUNC], #include ]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; } @@ -79,7 +81,7 @@ int main() HAVE_DECL_TRUNC=0 fi if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then - AC_LIBOBJ([trunc]) + dnl No libraries are needed to link lib/trunc.c. TRUNC_LIBM= fi AC_SUBST([TRUNC_LIBM])