+2023-10-13 Bruno Haible <bruno@clisp.org>
+
+ signed-nan: New module, renamed from qnan.
+ * lib/signed-nan.h: Renamed from lib/qnan.h. Update double-inclusion
+ guard.
+ * modules/signed-nan: Renamed from modules/qnan. Update.
+ * tests/test-signbit.c: Update.
+ * tests/test-stdio.c: Likewise.
+ * tests/test-totalorder.c: Likewise.
+ * modules/*-tests: Update.
+
2023-10-13 Bruno Haible <bruno@clisp.org>
access: Fix test failure on native Windows.
+++ /dev/null
-/* Macros for quiet not-a-number.
- Copyright (C) 2023 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 <https://www.gnu.org/licenses/>. */
-
-#ifndef _QNAN_H
-#define _QNAN_H
-
-#include <math.h>
-
-#include "nan.h"
-
-
-/* Returns a quiet 'float' NaN with sign bit == 0. */
-_GL_UNUSED static float
-positive_NaNf ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- float volatile nan = NaNf ();
- return (signbit (nan) ? - nan : nan);
-}
-
-/* Returns a quiet 'float' NaN with sign bit == 1. */
-_GL_UNUSED static float
-negative_NaNf ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- float volatile nan = NaNf ();
- return (signbit (nan) ? nan : - nan);
-}
-
-
-/* Returns a quiet 'double' NaN with sign bit == 0. */
-_GL_UNUSED static double
-positive_NaNd ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- double volatile nan = NaNd ();
- return (signbit (nan) ? - nan : nan);
-}
-
-/* Returns a quiet 'double' NaN with sign bit == 1. */
-_GL_UNUSED static double
-negative_NaNd ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- double volatile nan = NaNd ();
- return (signbit (nan) ? nan : - nan);
-}
-
-
-/* Returns a quiet 'long double' NaN with sign bit == 0. */
-_GL_UNUSED static long double
-positive_NaNl ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- long double volatile nan = NaNl ();
- return (signbit (nan) ? - nan : nan);
-}
-
-/* Returns a quiet 'long double' NaN with sign bit == 1. */
-_GL_UNUSED static long double
-negative_NaNl ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- long double volatile nan = NaNl ();
- return (signbit (nan) ? nan : - nan);
-}
-
-
-#endif /* _QNAN_H */
--- /dev/null
+/* Macros for quiet not-a-number.
+ Copyright (C) 2023 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 <https://www.gnu.org/licenses/>. */
+
+#ifndef _SIGNED_NAN_H
+#define _SIGNED_NAN_H
+
+#include <math.h>
+
+#include "nan.h"
+
+
+/* Returns a quiet 'float' NaN with sign bit == 0. */
+_GL_UNUSED static float
+positive_NaNf ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ float volatile nan = NaNf ();
+ return (signbit (nan) ? - nan : nan);
+}
+
+/* Returns a quiet 'float' NaN with sign bit == 1. */
+_GL_UNUSED static float
+negative_NaNf ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ float volatile nan = NaNf ();
+ return (signbit (nan) ? nan : - nan);
+}
+
+
+/* Returns a quiet 'double' NaN with sign bit == 0. */
+_GL_UNUSED static double
+positive_NaNd ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ double volatile nan = NaNd ();
+ return (signbit (nan) ? - nan : nan);
+}
+
+/* Returns a quiet 'double' NaN with sign bit == 1. */
+_GL_UNUSED static double
+negative_NaNd ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ double volatile nan = NaNd ();
+ return (signbit (nan) ? nan : - nan);
+}
+
+
+/* Returns a quiet 'long double' NaN with sign bit == 0. */
+_GL_UNUSED static long double
+positive_NaNl ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ long double volatile nan = NaNl ();
+ return (signbit (nan) ? - nan : nan);
+}
+
+/* Returns a quiet 'long double' NaN with sign bit == 1. */
+_GL_UNUSED static long double
+negative_NaNl ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ long double volatile nan = NaNl ();
+ return (signbit (nan) ? nan : - nan);
+}
+
+
+#endif /* _SIGNED_NAN_H */
+++ /dev/null
-Description:
-Macros for quiet not-a-number.
-
-Files:
-lib/qnan.h
-
-Depends-on:
-nan
-signbit
-
-configure.ac:
-
-Makefile.am:
-lib_SOURCES += qnan.h
-
-Include:
-"qnan.h"
-
-Link:
-
-License:
-GPL
-
-Maintainer:
-all
Depends-on:
float
-qnan
+signed-nan
snan
configure.ac:
--- /dev/null
+Description:
+Macros for quiet not-a-number.
+
+Files:
+lib/signed-nan.h
+
+Depends-on:
+nan
+signbit
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += signed-nan.h
+
+Include:
+"signed-nan.h"
+
+Link:
+
+License:
+GPL
+
+Maintainer:
+all
Depends-on:
assert-h
-qnan
+signed-nan
snan
stdio-c++-tests
fgetc-tests
tests/macros.h
Depends-on:
-qnan
+signed-nan
configure.ac:
tests/macros.h
Depends-on:
-qnan
+signed-nan
configure.ac:
tests/macros.h
Depends-on:
-qnan
+signed-nan
configure.ac:
#include "minus-zero.h"
#include "infinity.h"
-#include "qnan.h"
+#include "signed-nan.h"
#include "snan.h"
#include "macros.h"
#include <string.h>
-#include "qnan.h"
+#include "signed-nan.h"
#include "snan.h"
#include "macros.h"
#include "infinity.h"
#include "macros.h"
#include "minus-zero.h"
-#include "qnan.h"
+#include "signed-nan.h"
#ifndef TOTALORDER
# define TOTALORDER totalorder