Eric Blake wrote: > > ++++ b/lib/isnan.c > > +@@ -67,6 +67,8 @@ > > + ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) > > + typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double; > > + > > ++int FUNC (DOUBLE x); > > Why are there no header files declaring rpl_isnan? Isn't a better fix to > patch math.in.h to declare everything that we will be providing?
math.in.h does declare everything that it provides. But math.in.h is not always present when isnan[fdl].c is compiled. This should silence gcc and address your question. 2009-10-27 Bruno Haible <br...@clisp.org> * lib/isnan.c (rpl_isnan[fdl]): Repeat the specification declaration. Reported by Jim Meyering. --- lib/isnan.c.orig 2009-10-28 01:22:06.000000000 +0100 +++ lib/isnan.c 2009-10-28 01:20:17.000000000 +0100 @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,18 @@ #include <config.h> +/* Specification. */ +#ifdef USE_LONG_DOUBLE +/* Specification found in math.h or isnanl-nolibm.h. */ +extern int rpl_isnanl (long double x); +#elif ! defined USE_FLOAT +/* Specification found in math.h or isnand-nolibm.h. */ +extern int rpl_isnand (double x); +#else /* defined USE_FLOAT */ +/* Specification found in math.h or isnanf-nolibm.h. */ +extern int rpl_isnanf (float x); +#endif + #include <float.h> #include <string.h>