+2008-07-10 Ben Pfaff <blp@gnu.org>
+
+ * lib/isnanf.h: Rename lib/isnanf-nolibm.h.
+ * lib/isnand.h: Rename lib/isnand-nolibm.h.
+ * tests/test-isnanf.c: Rename tests/test-isnanf-nolibm.c.
+ * tests/test-isnand.c: Rename tests/test-isnand-nolibm.c.
+ * modules/isnanf-nolibm: Update references to renamed files.
+ * modules/isnand-nolibm: Likewise.
+ * modules/isnanf-nolibm-tests: Likewise.
+ * modules/isnand-nolibm-tests: Likewise.
+ * lib/frexp.c: Likewise.
+ * lib/isfinite.c: Likewise.
+ * lib/signbitd.c: Likewise.
+ * lib/signbitf.c: Likewise.
+ * lib/vasnprintf.c: Likewise.
+ * tests/test-ceilf1.c: Likewise.
+ * tests/test-ceilf2.c: Likewise.
+ * tests/test-floorf1.c: Likewise.
+ * tests/test-floorf2.c: Likewise.
+ * tests/test-frexp.c: Likewise.
+ * tests/test-round1.c: Likewise.
+ * tests/test-round2.c: Likewise.
+ * tests/test-roundf1.c: Likewise.
+ * tests/test-strtod.c: Likewise.
+ * tests/test-trunc1.c: Likewise.
+ * tests/test-trunc2.c: Likewise.
+ * tests/test-truncf1.c: Likewise.
+ * tests/test-truncf2.c: Likewise.
+ * NEWS: Mention the renamed header files.
+
2008-07-11 Jim Meyering <meyering@redhat.com>
vc-list-files: make the last-resort awk code more portable
Date Modules Changes
+2008-07-07 isnanf-nolibm The include file is changed from "isnanf.h"
+ to "isnanf-nolibm.h".
+ isnand-nolibm The include file is changed from "isnand.h"
+ to "isnand-nolibm.h".
+
2008-06-10 execute The execute function takes an additional termsigp
argument. Passing termsigp = NULL is ok.
wait-process The wait_subprocess function takes an additional
# include "isnanl-nolibm.h"
# include "fpucw.h"
#else
-# include "isnand.h"
+# include "isnand-nolibm.h"
#endif
/* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater
#include <config.h>
-#include "isnanf.h"
-#include "isnand.h"
+#include "isnanf-nolibm.h"
+#include "isnand-nolibm.h"
#include "isnanl-nolibm.h"
int gl_isfinitef (float x)
--- /dev/null
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2008 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNAND_IN_LIBC
+/* Get declaration of isnan macro. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnand
+# define isnand(x) __builtin_isnan ((double)(x))
+# else
+# undef isnand
+# define isnand(x) isnan ((double)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnand
+# define isnand rpl_isnand
+extern int isnand (double x);
+#endif
+++ /dev/null
-/* Test for NaN that does not need libm.
- Copyright (C) 2007-2008 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if HAVE_ISNAND_IN_LIBC
-/* Get declaration of isnan macro. */
-# include <math.h>
-# if __GNUC__ >= 4
- /* GCC 4.0 and newer provides three built-ins for isnan. */
-# undef isnand
-# define isnand(x) __builtin_isnan ((double)(x))
-# else
-# undef isnand
-# define isnand(x) isnan ((double)(x))
-# endif
-#else
-/* Test whether X is a NaN. */
-# undef isnand
-# define isnand rpl_isnand
-extern int isnand (double x);
-#endif
--- /dev/null
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2008 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNANF_IN_LIBC
+/* Get declaration of isnan macro or (older) isnanf function. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+# elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnanf
+# define isnanf rpl_isnanf
+extern int isnanf (float x);
+#endif
+++ /dev/null
-/* Test for NaN that does not need libm.
- Copyright (C) 2007-2008 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if HAVE_ISNANF_IN_LIBC
-/* Get declaration of isnan macro or (older) isnanf function. */
-# include <math.h>
-# if __GNUC__ >= 4
- /* GCC 4.0 and newer provides three built-ins for isnan. */
-# undef isnanf
-# define isnanf(x) __builtin_isnanf ((float)(x))
-# elif defined isnan
-# undef isnanf
-# define isnanf(x) isnan ((float)(x))
-# endif
-#else
-/* Test whether X is a NaN. */
-# undef isnanf
-# define isnanf rpl_isnanf
-extern int isnanf (float x);
-#endif
#include <math.h>
#include <string.h>
-#include "isnand.h"
+#include "isnand-nolibm.h"
#include "float+.h"
#undef gl_signbitd
#include <math.h>
#include <string.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#include "float+.h"
#undef gl_signbitf
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
-# include "isnand.h"
+# include "isnand-nolibm.h"
#endif
#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
-# include "isnand.h"
+# include "isnand-nolibm.h"
# include "printf-frexp.h"
#endif
isnand() function: test for NaN, without requiring libm.
Files:
-lib/isnand.h
+lib/isnand-nolibm.h
lib/isnand.c
lib/isnan.c
lib/float+.h
Makefile.am:
Include:
-#include "isnand.h"
+#include "isnand-nolibm.h"
License:
LGPL
Files:
-tests/test-isnand.c
+tests/test-isnand-nolibm.c
tests/nan.h
Depends-on:
gl_DOUBLE_EXPONENT_LOCATION
Makefile.am:
-TESTS += test-isnand
-check_PROGRAMS += test-isnand
+TESTS += test-isnand-nolibm
+check_PROGRAMS += test-isnand-nolibm
isnanf() function: test for NaN, without requiring libm.
Files:
-lib/isnanf.h
+lib/isnanf-nolibm.h
lib/isnanf.c
lib/isnan.c
lib/float+.h
Makefile.am:
Include:
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
License:
LGPL
Files:
-tests/test-isnanf.c
+tests/test-isnanf-nolibm.c
tests/nan.h
Depends-on:
gl_FLOAT_EXPONENT_LOCATION
Makefile.am:
-TESTS += test-isnanf
-check_PROGRAMS += test-isnanf
+TESTS += test-isnanf-nolibm
+check_PROGRAMS += test-isnanf-nolibm
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#include "nan.h"
#define ASSERT(expr) \
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#define ASSERT(expr) \
do \
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#include "nan.h"
#define ASSERT(expr) \
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#define ASSERT(expr) \
do \
#include <stdio.h>
#include <stdlib.h>
-#include "isnand.h"
+#include "isnand-nolibm.h"
#include "nan.h"
/* Avoid some warnings from "gcc -Wshadow".
--- /dev/null
+/* Test of isnand() substitute.
+ Copyright (C) 2007-2008 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "isnand-nolibm.h"
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "nan.h"
+
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ fflush (stderr); \
+ abort (); \
+ } \
+ } \
+ while (0)
+
+int
+main ()
+{
+ /* Finite values. */
+ ASSERT (!isnand (3.141));
+ ASSERT (!isnand (3.141e30));
+ ASSERT (!isnand (3.141e-30));
+ ASSERT (!isnand (-2.718));
+ ASSERT (!isnand (-2.718e30));
+ ASSERT (!isnand (-2.718e-30));
+ ASSERT (!isnand (0.0));
+ ASSERT (!isnand (-0.0));
+ /* Infinite values. */
+ ASSERT (!isnand (1.0 / 0.0));
+ ASSERT (!isnand (-1.0 / 0.0));
+ /* Quiet NaN. */
+ ASSERT (isnand (NaNd ()));
+#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+ memory_double m;
+ m.value = NaNd ();
+# if DBL_EXPBIT0_BIT > 0
+ m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1);
+# else
+ m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ |= (unsigned int) 1 << DBL_EXPBIT0_BIT;
+ ASSERT (isnand (m.value));
+ }
+#endif
+ return 0;
+}
+++ /dev/null
-/* Test of isnand() substitute.
- Copyright (C) 2007-2008 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-
-#include <config.h>
-
-#include "isnand.h"
-
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
-int
-main ()
-{
- /* Finite values. */
- ASSERT (!isnand (3.141));
- ASSERT (!isnand (3.141e30));
- ASSERT (!isnand (3.141e-30));
- ASSERT (!isnand (-2.718));
- ASSERT (!isnand (-2.718e30));
- ASSERT (!isnand (-2.718e-30));
- ASSERT (!isnand (0.0));
- ASSERT (!isnand (-0.0));
- /* Infinite values. */
- ASSERT (!isnand (1.0 / 0.0));
- ASSERT (!isnand (-1.0 / 0.0));
- /* Quiet NaN. */
- ASSERT (isnand (NaNd ()));
-#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
- /* Signalling NaN. */
- {
- #define NWORDS \
- ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
- typedef union { double value; unsigned int word[NWORDS]; } memory_double;
- memory_double m;
- m.value = NaNd ();
-# if DBL_EXPBIT0_BIT > 0
- m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1);
-# else
- m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
- ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
-# endif
- m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
- |= (unsigned int) 1 << DBL_EXPBIT0_BIT;
- ASSERT (isnand (m.value));
- }
-#endif
- return 0;
-}
--- /dev/null
+/* Test of isnanf() substitute.
+ Copyright (C) 2007-2008 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "isnanf-nolibm.h"
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "nan.h"
+
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ fflush (stderr); \
+ abort (); \
+ } \
+ } \
+ while (0)
+
+int
+main ()
+{
+ /* Finite values. */
+ ASSERT (!isnanf (3.141f));
+ ASSERT (!isnanf (3.141e30f));
+ ASSERT (!isnanf (3.141e-30f));
+ ASSERT (!isnanf (-2.718f));
+ ASSERT (!isnanf (-2.718e30f));
+ ASSERT (!isnanf (-2.718e-30f));
+ ASSERT (!isnanf (0.0f));
+ ASSERT (!isnanf (-0.0f));
+ /* Infinite values. */
+ ASSERT (!isnanf (1.0f / 0.0f));
+ ASSERT (!isnanf (-1.0f / 0.0f));
+ /* Quiet NaN. */
+ ASSERT (isnanf (NaNf ()));
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+ memory_float m;
+ m.value = NaNf ();
+# if FLT_EXPBIT0_BIT > 0
+ m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1);
+# else
+ m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ if (FLT_EXPBIT0_WORD < NWORDS / 2)
+ m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT;
+ else
+ m.word[0] |= (unsigned int) 1;
+ ASSERT (isnanf (m.value));
+ }
+#endif
+ return 0;
+}
+++ /dev/null
-/* Test of isnanf() substitute.
- Copyright (C) 2007-2008 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-
-#include <config.h>
-
-#include "isnanf.h"
-
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
-int
-main ()
-{
- /* Finite values. */
- ASSERT (!isnanf (3.141f));
- ASSERT (!isnanf (3.141e30f));
- ASSERT (!isnanf (3.141e-30f));
- ASSERT (!isnanf (-2.718f));
- ASSERT (!isnanf (-2.718e30f));
- ASSERT (!isnanf (-2.718e-30f));
- ASSERT (!isnanf (0.0f));
- ASSERT (!isnanf (-0.0f));
- /* Infinite values. */
- ASSERT (!isnanf (1.0f / 0.0f));
- ASSERT (!isnanf (-1.0f / 0.0f));
- /* Quiet NaN. */
- ASSERT (isnanf (NaNf ()));
-#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
- /* Signalling NaN. */
- {
- #define NWORDS \
- ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
- typedef union { float value; unsigned int word[NWORDS]; } memory_float;
- memory_float m;
- m.value = NaNf ();
-# if FLT_EXPBIT0_BIT > 0
- m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1);
-# else
- m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
- ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
-# endif
- if (FLT_EXPBIT0_WORD < NWORDS / 2)
- m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT;
- else
- m.word[0] |= (unsigned int) 1;
- ASSERT (isnanf (m.value));
- }
-#endif
- return 0;
-}
#include <stdio.h>
#include <stdlib.h>
-#include "isnand.h"
+#include "isnand-nolibm.h"
#include "nan.h"
#define ASSERT(expr) \
#ifdef USE_LONG_DOUBLE
# error Long double not supported.
#elif ! defined USE_FLOAT
-# include "isnand.h"
+# include "isnand-nolibm.h"
# define ISNAN isnand
# define FUNCTION "round"
# define DOUBLE_UINT uint64_t
# define NUM_HIGHBITS 13
# define NUM_LOWBITS 4
#else /* defined USE_FLOAT */
-# include "isnanf.h"
+# include "isnanf-nolibm.h"
# define ISNAN isnanf
# define FUNCTION "roundf"
# define DOUBLE_UINT uint32_t
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#include "nan.h"
#define ASSERT(expr) \
#include <stdio.h>
#include <string.h>
-#include "isnand.h"
+#include "isnand-nolibm.h"
#define ASSERT(expr) \
do \
#include <stdio.h>
#include <stdlib.h>
-#include "isnand.h"
+#include "isnand-nolibm.h"
#include "nan.h"
#define ASSERT(expr) \
#include <stdio.h>
#include <stdlib.h>
-#include "isnand.h"
+#include "isnand-nolibm.h"
#define ASSERT(expr) \
do \
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#include "nan.h"
#define ASSERT(expr) \
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#define ASSERT(expr) \
do \