From 815a9ce58a14afdff659a287ff4d55cbef7cf35d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 12 Oct 2023 21:46:13 +0200 Subject: [PATCH] snan: New module. * lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard. * modules/snan: New file. * isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. * isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. * isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. * isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION. * isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION. * isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION. * isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION. * isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION. * isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION. * signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4. (Depends-on): Add snan. (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. * stdio-tests (Files): Remove tests/snan.h (Depends-on): Add snan. --- ChangeLog | 42 +++++++++++++++++++++++++++++++++++++ {tests => lib}/snan.h | 6 ++++++ modules/isfinite-tests | 8 +------ modules/isinf-tests | 8 +------ modules/isnan-tests | 8 +------ modules/isnand-nolibm-tests | 4 +--- modules/isnand-tests | 4 +--- modules/isnanf-nolibm-tests | 4 +--- modules/isnanf-tests | 4 +--- modules/isnanl-nolibm-tests | 4 +--- modules/isnanl-tests | 4 +--- modules/signbit-tests | 8 +------ modules/snan | 29 +++++++++++++++++++++++++ modules/stdio-tests | 2 +- 14 files changed, 88 insertions(+), 47 deletions(-) rename {tests => lib}/snan.h (98%) create mode 100644 modules/snan diff --git a/ChangeLog b/ChangeLog index b072697e2a..ede627dca4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +2023-10-12 Bruno Haible + + snan: New module. + * lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard. + * modules/snan: New file. + * isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, + gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. + * isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, + gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. + * isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, + gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. + * isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION. + * isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION. + * isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION. + * isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION. + * isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION. + * isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION. + * signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4. + (Depends-on): Add snan. + (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION, + gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION. + * stdio-tests (Files): Remove tests/snan.h + (Depends-on): Add snan. + 2023-10-12 Bruno Haible qnan: New module. diff --git a/tests/snan.h b/lib/snan.h similarity index 98% rename from tests/snan.h rename to lib/snan.h index e877000ece..5dd4dd6f9e 100644 --- a/tests/snan.h +++ b/lib/snan.h @@ -14,6 +14,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifndef _SNAN_H +#define _SNAN_H + #include #include #include @@ -118,3 +121,6 @@ SNaNl () } #endif + + +#endif /* _SNAN_H */ diff --git a/modules/isfinite-tests b/modules/isfinite-tests index 16f4c8d187..5b316dd2ee 100644 --- a/modules/isfinite-tests +++ b/modules/isfinite-tests @@ -1,20 +1,14 @@ Files: tests/test-isfinite.c tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentf.m4 -m4/exponentd.m4 -m4/exponentl.m4 Depends-on: float nan +snan configure.ac: -gl_FLOAT_EXPONENT_LOCATION -gl_DOUBLE_EXPONENT_LOCATION -gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) Makefile.am: diff --git a/modules/isinf-tests b/modules/isinf-tests index caf77a88f9..0cae337cb2 100644 --- a/modules/isinf-tests +++ b/modules/isinf-tests @@ -1,20 +1,14 @@ Files: tests/test-isinf.c tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentf.m4 -m4/exponentd.m4 -m4/exponentl.m4 Depends-on: float nan +snan configure.ac: -gl_FLOAT_EXPONENT_LOCATION -gl_DOUBLE_EXPONENT_LOCATION -gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) Makefile.am: diff --git a/modules/isnan-tests b/modules/isnan-tests index 8da13c2349..f0d5280cf3 100644 --- a/modules/isnan-tests +++ b/modules/isnan-tests @@ -2,20 +2,14 @@ Files: tests/test-isnan.c tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentf.m4 -m4/exponentd.m4 -m4/exponentl.m4 Depends-on: float nan +snan configure.ac: -gl_FLOAT_EXPONENT_LOCATION -gl_DOUBLE_EXPONENT_LOCATION -gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) Makefile.am: diff --git a/modules/isnand-nolibm-tests b/modules/isnand-nolibm-tests index b4fa23e9d9..9a8569f966 100644 --- a/modules/isnand-nolibm-tests +++ b/modules/isnand-nolibm-tests @@ -3,15 +3,13 @@ tests/test-isnand-nolibm.c tests/test-isnand.h tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentd.m4 Depends-on: nan +snan configure.ac: -gl_DOUBLE_EXPONENT_LOCATION Makefile.am: TESTS += test-isnand-nolibm diff --git a/modules/isnand-tests b/modules/isnand-tests index 82f4d2e1dc..a3c8b564c2 100644 --- a/modules/isnand-tests +++ b/modules/isnand-tests @@ -3,15 +3,13 @@ tests/test-isnand.c tests/test-isnand.h tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentd.m4 Depends-on: nan +snan configure.ac: -gl_DOUBLE_EXPONENT_LOCATION Makefile.am: TESTS += test-isnand diff --git a/modules/isnanf-nolibm-tests b/modules/isnanf-nolibm-tests index 6dece6e5d9..3ceb3c14d9 100644 --- a/modules/isnanf-nolibm-tests +++ b/modules/isnanf-nolibm-tests @@ -3,15 +3,13 @@ tests/test-isnanf-nolibm.c tests/test-isnanf.h tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentf.m4 Depends-on: nan +snan configure.ac: -gl_FLOAT_EXPONENT_LOCATION Makefile.am: TESTS += test-isnanf-nolibm diff --git a/modules/isnanf-tests b/modules/isnanf-tests index 464618c2f9..f1d5213ba8 100644 --- a/modules/isnanf-tests +++ b/modules/isnanf-tests @@ -3,15 +3,13 @@ tests/test-isnanf.c tests/test-isnanf.h tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentf.m4 Depends-on: nan +snan configure.ac: -gl_FLOAT_EXPONENT_LOCATION Makefile.am: TESTS += test-isnanf diff --git a/modules/isnanl-nolibm-tests b/modules/isnanl-nolibm-tests index 88a4ddfc9c..c35806d6a6 100644 --- a/modules/isnanl-nolibm-tests +++ b/modules/isnanl-nolibm-tests @@ -3,16 +3,14 @@ tests/test-isnanl-nolibm.c tests/test-isnanl.h tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentl.m4 Depends-on: float nan +snan configure.ac: -gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) Makefile.am: diff --git a/modules/isnanl-tests b/modules/isnanl-tests index 24ea78471e..2206808160 100644 --- a/modules/isnanl-tests +++ b/modules/isnanl-tests @@ -3,16 +3,14 @@ tests/test-isnanl.c tests/test-isnanl.h tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentl.m4 Depends-on: float nan +snan configure.ac: -gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) Makefile.am: diff --git a/modules/signbit-tests b/modules/signbit-tests index c194881503..c491d7c885 100644 --- a/modules/signbit-tests +++ b/modules/signbit-tests @@ -2,20 +2,14 @@ Files: tests/test-signbit.c tests/minus-zero.h tests/infinity.h -tests/snan.h tests/macros.h -m4/exponentf.m4 -m4/exponentd.m4 -m4/exponentl.m4 Depends-on: float qnan +snan configure.ac: -AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) -AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) -AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION]) Makefile.am: TESTS += test-signbit diff --git a/modules/snan b/modules/snan new file mode 100644 index 0000000000..2ccbb111db --- /dev/null +++ b/modules/snan @@ -0,0 +1,29 @@ +Description: +Macros for signalling not-a-number. + +Files: +lib/snan.h +m4/snan.m4 +m4/exponentf.m4 +m4/exponentd.m4 +m4/exponentl.m4 + +Depends-on: +nan + +configure.ac: +gl_SNAN + +Makefile.am: +lib_SOURCES += snan.h + +Include: +"snan.h" + +Link: + +License: +GPL + +Maintainer: +all diff --git a/modules/stdio-tests b/modules/stdio-tests index d1bec9d441..5f94d3961d 100644 --- a/modules/stdio-tests +++ b/modules/stdio-tests @@ -1,12 +1,12 @@ Files: tests/test-stdio.c -tests/snan.h tests/macros.h m4/exponentd.m4 Depends-on: assert-h qnan +snan stdio-c++-tests fgetc-tests fputc-tests -- 2.39.5