Re: groff/gnulib build problem: infinite(), isinf() fail using C++ on Solaris 11/sun4u with GCC 5.5.0
Bruno Haible via Gnulib discussion list <[email protected]>
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.printing.groff.general |
|---|---|
| Organization | GNU |
| Message-ID | <4082615.UHzMenYllF@nimes> |
Hi,
G. Branden Robinson wrote:
> Here's an abbreviated "configure && gmake V=1" build log. I'm including
> groff's own configuration summary because that's essential information
> for me as its maintainer, and it also discloses the names of the
> compilers found and used. I'm also including the list of header files
> gnulib decided it needed to generate.
>
> config.status: executing depfiles commands
>
> GNU roff version 1.23.0.4692-4b2f66
> ----------------------------------------------------------------------
> C++ compiler and options : g++ -std=gnu++11 -g -O2 -D_REENTRANT
> C compiler and options : gcc -g -O2 -D_REENTRANT
> ----------------------------------------------------------------------
> ...
> depbase=`echo src/devices/grodvi/dvi.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I./src/include -I./src/include -I./lib -I./src/include -I./lib -D_REENTRANT -g -O2 -MT src/devices/grodvi/dvi.o -MD -MP -MF $depbase.Tpo -c -o src/devices/grodvi/dvi.o src/devices/grodvi/dvi.cpp &&\
> mv -f $depbase.Tpo $depbase.Po
> In file included from src/devices/grodvi/dvi.cpp:26:0:
> ./lib/math.h: In function ‘bool isfinite(float)’:
> ./lib/math.h:3098:1: error: ‘bool isfinite(float)’ conflicts with a previous declaration
> _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool)
> ^
> In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:23:0,
> from ./lib/math.h:46,
> from src/devices/grodvi/dvi.cpp:26:
> /usr/include/iso/math_c99.h:685:14: note: previous declaration ‘bool std::isfinite(float)’
> inline bool isfinite(float __X) { return __builtin_isfinite(__X); }
> ^
> In file included from src/devices/grodvi/dvi.cpp:26:0:
> ./lib/math.h: In function ‘bool isfinite(double)’:
> ./lib/math.h:3098:1: error: ‘bool isfinite(double)’ conflicts with a previous declaration
> _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool)
> ^
> In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:23:0,
> from ./lib/math.h:46,
> from src/devices/grodvi/dvi.cpp:26:
> /usr/include/iso/math_c99.h:710:14: note: previous declaration ‘bool std::isfinite(double)’
> inline bool isfinite(double __X) { return __builtin_isfinite(__X); }
> ^
> In file included from src/devices/grodvi/dvi.cpp:26:0:
> ./lib/math.h: In function ‘bool isfinite(long double)’:
> ./lib/math.h:3098:1: error: ‘bool isfinite(long double)’ conflicts with a previous declaration
> _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool)
> ^
> In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:23:0,
> from ./lib/math.h:46,
> from src/devices/grodvi/dvi.cpp:26:
> /usr/include/iso/math_c99.h:731:14: note: previous declaration ‘bool std::isfinite(long double)’
> inline bool isfinite(long double __X) {
> ^
> In file included from src/devices/grodvi/dvi.cpp:26:0:
> ./lib/math.h: In function ‘bool isinf(float)’:
> ./lib/math.h:3133:1: error: ‘bool isinf(float)’ conflicts with a previous declaration
> _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool)
> ^
> In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:23:0,
> from ./lib/math.h:46,
> from src/devices/grodvi/dvi.cpp:26:
> /usr/include/iso/math_c99.h:686:14: note: previous declaration ‘bool std::isinf(float)’
> inline bool isinf(float __X) { return __builtin_isinf(__X); }
> ^
> In file included from src/devices/grodvi/dvi.cpp:26:0:
> ./lib/math.h: In function ‘bool isinf(double)’:
> ./lib/math.h:3133:1: error: ‘bool isinf(double)’ conflicts with a previous declaration
> _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool)
> ^
> In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:23:0,
> from ./lib/math.h:46,
> from src/devices/grodvi/dvi.cpp:26:
> /usr/include/iso/math_c99.h:711:14: note: previous declaration ‘bool std::isinf(double)’
> inline bool isinf(double __X) { return __builtin_isinf(__X); }
> ^
> In file included from src/devices/grodvi/dvi.cpp:26:0:
> ./lib/math.h: In function ‘bool isinf(long double)’:
> ./lib/math.h:3133:1: error: ‘bool isinf(long double)’ conflicts with a previous declaration
> _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool)
> ^
> In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:23:0,
> from ./lib/math.h:46,
> from src/devices/grodvi/dvi.cpp:26:
> /usr/include/iso/math_c99.h:733:14: note: previous declaration ‘bool std::isinf(long double)’
> inline bool isinf(long double __X) { return __builtin_isinf(__X); }
> ^
> gmake[2]: *** [Makefile:10882: src/devices/grodvi/dvi.o] Error 1
> gmake[2]: Leaving directory '/export/home/gbranden/groff-1.23.0.4692-4b2f66'
> gmake[1]: *** [Makefile:13270: all-recursive] Error 1
> gmake[1]: Leaving directory '/export/home/gbranden/groff-1.23.0.4692-4b2f66'
> gmake: *** [Makefile:7539: all] Error 2
> $ g++ --version
> g++ (GCC) 5.5.0
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ gcc --version
> gcc (GCC) 5.5.0
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ uname -a
> SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise
Thanks for the report.
The error occurs because
- groff's gnulib use includes the module 'fmod',
- the module 'fmod' depends on 'isfinite' and 'isinf'.
- the set of overrides (isfinite, isinf, isnan, signbit) is fragile: it needs
tweaks for various C++ compilers.
1) But 'fmod' does not need a replacement on Solaris (nor on any modern platform).
Therefore if you used the gnulib-tool option --conditional-dependencies, the
error should go away.
2) Another possibility is to fix this in Gnulib. Since the code is so fragile,
fixing things for this old GCC may trigger a problem on other platforms; therefore
that's not the way I want to go.
But note that 'fmod' being a C module, no one has actually asked for a working
isfinite() or isinf() function/macro in C++ mode. Therefore here are patches to
simply not activate a C++ declaration that no one has asked for. This should fix
things for you.
Bruno
0001-isfinite-no-c-New-module.patch
(text/x-patch, 22.1 KB)
From 060d155810c5f016033a53c4da227263ba74d83f Mon Sep 17 00:00:00 2001 From: Bruno Haible <[email protected]> Date: Fri, 19 Dec 2025 23:23:30 +0100 Subject: [PATCH 1/4] isfinite-no-c++: New module. Reported by G. Branden Robinson <[email protected]> in <https://lists.gnu.org/archive/html/bug-gnulib/2025-12/msg00150.html>. * modules/isfinite-no-c++: New file, based on modules/isfinite. * modules/isfinite: Essentially an alias of isfinite-no-c++ now. * modules/isfinite-no-c++-tests: Renamed from modules/isfinite-tests. * lib/math.in.h (isfinite): Test also GNULIB_ISFINITE_NO_CXX. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISFINITE_NO_CXX. * modules/math-h (Makefile.am): Substitute GNULIB_ISFINITE_NO_CXX. * modules/cbrt (Depends-on): Add isfinite-no-c++. Remove isfinite. * modules/cbrtf (Depends-on): Likewise. * modules/cbrtl (Depends-on): Likewise. * modules/fma (Depends-on): Likewise. * modules/fmaf (Depends-on): Likewise. * modules/fmal (Depends-on): Likewise. * modules/fmod (Depends-on): Likewise. * modules/fmodl (Depends-on): Likewise. * modules/hypot (Depends-on): Likewise. * modules/hypotl (Depends-on): Likewise. * modules/ilogb (Depends-on): Likewise. * modules/ilogbf (Depends-on): Likewise. * modules/ilogbl (Depends-on): Likewise. * modules/logb (Depends-on): Likewise. * modules/logbf (Depends-on): Likewise. * modules/logbl (Depends-on): Likewise. * modules/modf (Depends-on): Likewise. * modules/modfl (Depends-on): Likewise. * modules/remainder (Depends-on): Likewise. * modules/remainderf (Depends-on): Likewise. * modules/remainderl (Depends-on): Likewise. --- ChangeLog | 34 ++++++++++++++++++ lib/math.in.h | 4 +-- m4/math_h.m4 | 3 +- modules/cbrt | 2 +- modules/cbrtf | 2 +- modules/cbrtl | 2 +- modules/fma | 2 +- modules/fmaf | 4 +-- modules/fmal | 2 +- modules/fmod | 2 +- modules/fmodl | 2 +- modules/hypot | 2 +- modules/hypotl | 2 +- modules/ilogb | 2 +- modules/ilogbf | 2 +- modules/ilogbl | 2 +- modules/isfinite | 17 +-------- modules/isfinite-no-c++ | 36 +++++++++++++++++++ .../{isfinite-tests => isfinite-no-c++-tests} | 0 modules/logb | 2 +- modules/logbf | 2 +- modules/logbl | 2 +- modules/math-h | 1 + modules/modf | 2 +- modules/modfl | 2 +- modules/remainder | 2 +- modules/remainderf | 2 +- modules/remainderl | 2 +- 28 files changed, 98 insertions(+), 41 deletions(-) create mode 100644 modules/isfinite-no-c++ rename modules/{isfinite-tests => isfinite-no-c++-tests} (100%) diff --git a/ChangeLog b/ChangeLog index fe19efcc4b..8439755c9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +2025-12-19 Bruno Haible <[email protected]> + + isfinite-no-c++: New module. + Reported by G. Branden Robinson <[email protected]> in + <https://lists.gnu.org/archive/html/bug-gnulib/2025-12/msg00150.html>. + * modules/isfinite-no-c++: New file, based on modules/isfinite. + * modules/isfinite: Essentially an alias of isfinite-no-c++ now. + * modules/isfinite-no-c++-tests: Renamed from modules/isfinite-tests. + * lib/math.in.h (isfinite): Test also GNULIB_ISFINITE_NO_CXX. + * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize + GNULIB_ISFINITE_NO_CXX. + * modules/math-h (Makefile.am): Substitute GNULIB_ISFINITE_NO_CXX. + * modules/cbrt (Depends-on): Add isfinite-no-c++. Remove isfinite. + * modules/cbrtf (Depends-on): Likewise. + * modules/cbrtl (Depends-on): Likewise. + * modules/fma (Depends-on): Likewise. + * modules/fmaf (Depends-on): Likewise. + * modules/fmal (Depends-on): Likewise. + * modules/fmod (Depends-on): Likewise. + * modules/fmodl (Depends-on): Likewise. + * modules/hypot (Depends-on): Likewise. + * modules/hypotl (Depends-on): Likewise. + * modules/ilogb (Depends-on): Likewise. + * modules/ilogbf (Depends-on): Likewise. + * modules/ilogbl (Depends-on): Likewise. + * modules/logb (Depends-on): Likewise. + * modules/logbf (Depends-on): Likewise. + * modules/logbl (Depends-on): Likewise. + * modules/modf (Depends-on): Likewise. + * modules/modfl (Depends-on): Likewise. + * modules/remainder (Depends-on): Likewise. + * modules/remainderf (Depends-on): Likewise. + * modules/remainderl (Depends-on): Likewise. + 2025-12-15 Collin Funk <[email protected]> nanosleep: Avoid a redefinition on mingw. diff --git a/lib/math.in.h b/lib/math.in.h index 53450d4c60..66b23e36ef 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2461,7 +2461,7 @@ _GL_CXXALIASWARN (yn); declarations. */ -#if @GNULIB_ISFINITE@ +#if @GNULIB_ISFINITE@ || @GNULIB_ISFINITE_NO_CXX@ # if @REPLACE_ISFINITE@ _GL_EXTERN_C int gl_isfinitef (float x); _GL_EXTERN_C int gl_isfinited (double x); @@ -2472,7 +2472,7 @@ _GL_EXTERN_C int gl_isfinitel (long double x); sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ gl_isfinitef (x)) # endif -# ifdef __cplusplus +# if @GNULIB_ISFINITE@ && defined __cplusplus # if defined isfinite || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite diff --git a/m4/math_h.m4 b/m4/math_h.m4 index 805cca471d..a8cc3c833f 100644 --- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 -# serial 142 +# serial 143 dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -131,6 +131,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS] gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBL]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE_NO_CXX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) diff --git a/modules/cbrt b/modules/cbrt index aa6c30c53a..458f1df643 100644 --- a/modules/cbrt +++ b/modules/cbrt @@ -9,7 +9,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -isfinite [test $HAVE_CBRT = 0] +isfinite-no-c++ [test $HAVE_CBRT = 0] fabs [test $HAVE_CBRT = 0] frexp [test $HAVE_CBRT = 0] ldexp [test $HAVE_CBRT = 0] diff --git a/modules/cbrtf b/modules/cbrtf index 0656c67999..e770857e78 100644 --- a/modules/cbrtf +++ b/modules/cbrtf @@ -10,7 +10,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -isfinite [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1] +isfinite-no-c++ [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1] fabsf [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1] frexpf [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1] ldexpf [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1] diff --git a/modules/cbrtl b/modules/cbrtl index caa6cd6efc..f8c37d5611 100644 --- a/modules/cbrtl +++ b/modules/cbrtl @@ -11,7 +11,7 @@ Depends-on: math-h extensions cbrt [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -isfinite [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] ldexpl [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/fma b/modules/fma index f27d0271c1..33ebcd3a52 100644 --- a/modules/fma +++ b/modules/fma @@ -13,7 +13,7 @@ math-h float-h [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] bool [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] assert-h [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] -isfinite [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] +isfinite-no-c++ [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] integer_length [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] frexp [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] ldexp [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1] diff --git a/modules/fmaf b/modules/fmaf index 08a75385a9..f2d77b801b 100644 --- a/modules/fmaf +++ b/modules/fmaf @@ -14,8 +14,8 @@ math-h extensions float-h [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] bool [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] -assert-h [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] -isfinite [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] +assert-h [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] +isfinite-no-c++ [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] integer_length [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] frexpf [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] ldexpf [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1] diff --git a/modules/fmal b/modules/fmal index 083cd8e068..7f9c5b8c0c 100644 --- a/modules/fmal +++ b/modules/fmal @@ -16,7 +16,7 @@ fma [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAV float-h [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] bool [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] assert-h [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isfinite [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] integer_length [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] ldexpl [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/fmod b/modules/fmod index 4b0c24f32d..7d271bfb78 100644 --- a/modules/fmod +++ b/modules/fmod @@ -8,7 +8,7 @@ m4/mathfunc.m4 Depends-on: math-h -isfinite [test $REPLACE_FMOD = 1] +isfinite-no-c++ [test $REPLACE_FMOD = 1] signbit [test $REPLACE_FMOD = 1] fabs [test $REPLACE_FMOD = 1] frexp [test $REPLACE_FMOD = 1] diff --git a/modules/fmodl b/modules/fmodl index 3e46f58d69..1a9ad6fbb2 100644 --- a/modules/fmodl +++ b/modules/fmodl @@ -12,7 +12,7 @@ math-h extensions fmod [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] float-h [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isfinite [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] signbit [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fabsl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/hypot b/modules/hypot index d12651c3c0..9e6fdc8432 100644 --- a/modules/hypot +++ b/modules/hypot @@ -9,7 +9,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -isfinite [test $REPLACE_HYPOT = 1] +isfinite-no-c++ [test $REPLACE_HYPOT = 1] fabs [test $REPLACE_HYPOT = 1] frexp [test $REPLACE_HYPOT = 1] ldexp [test $REPLACE_HYPOT = 1] diff --git a/modules/hypotl b/modules/hypotl index b1e334b330..8668724228 100644 --- a/modules/hypotl +++ b/modules/hypotl @@ -10,7 +10,7 @@ Depends-on: math-h extensions hypot [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -isfinite [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fabsl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] ldexpl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/ilogb b/modules/ilogb index 04884e26b0..3afffbba2e 100644 --- a/modules/ilogb +++ b/modules/ilogb @@ -8,7 +8,7 @@ m4/mathfunc.m4 Depends-on: math-h -isfinite [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1] +isfinite-no-c++ [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1] frexp [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1] isnand [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1] diff --git a/modules/ilogbf b/modules/ilogbf index eb01143711..6fb310c864 100644 --- a/modules/ilogbf +++ b/modules/ilogbf @@ -10,7 +10,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -isfinite [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1] +isfinite-no-c++ [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1] frexpf [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1] isnanf [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1] diff --git a/modules/ilogbl b/modules/ilogbl index ef3c54b3c8..69818f9467 100644 --- a/modules/ilogbl +++ b/modules/ilogbl @@ -11,7 +11,7 @@ Depends-on: math-h extensions ilogb [{ test $HAVE_ILOGBL = 0 || test $REPLACE_ILOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -isfinite [{ test $HAVE_ILOGBL = 0 || test $REPLACE_ILOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_ILOGBL = 0 || test $REPLACE_ILOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_ILOGBL = 0 || test $REPLACE_ILOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_ILOGBL = 0 || test $REPLACE_ILOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/isfinite b/modules/isfinite index 68382e32a6..f62e2d6ae6 100644 --- a/modules/isfinite +++ b/modules/isfinite @@ -2,29 +2,14 @@ Description: isfinite macro: test for finite value (zero, subnormal, or normal, and not infinite or NaN). Files: -lib/isfinite.c -m4/isfinite.m4 -m4/check-math-lib.m4 -m4/exponentl.m4 -m4/exponentd.m4 -m4/math_h.m4 Depends-on: -math-h -extensions -isnanf-nolibm [test $REPLACE_ISFINITE = 1] -isnand-nolibm [test $REPLACE_ISFINITE = 1] -isnanl-nolibm [test $REPLACE_ISFINITE = 1] +isfinite-no-c++ configure.ac: -gl_ISFINITE -gl_CONDITIONAL([GL_COND_OBJ_ISFINITE], [test $REPLACE_ISFINITE = 1]) gl_MATH_MODULE_INDICATOR([isfinite]) Makefile.am: -if GL_COND_OBJ_ISFINITE -lib_SOURCES += isfinite.c -endif Include: <math.h> diff --git a/modules/isfinite-no-c++ b/modules/isfinite-no-c++ new file mode 100644 index 0000000000..21224191ae --- /dev/null +++ b/modules/isfinite-no-c++ @@ -0,0 +1,36 @@ +Description: +isfinite macro: test for finite value (zero, subnormal, or normal, and not infinite or NaN). + +Files: +lib/isfinite.c +m4/isfinite.m4 +m4/check-math-lib.m4 +m4/exponentl.m4 +m4/exponentd.m4 +m4/math_h.m4 + +Depends-on: +math-h +extensions +isnanf-nolibm [test $REPLACE_ISFINITE = 1] +isnand-nolibm [test $REPLACE_ISFINITE = 1] +isnanl-nolibm [test $REPLACE_ISFINITE = 1] + +configure.ac: +gl_ISFINITE +gl_CONDITIONAL([GL_COND_OBJ_ISFINITE], [test $REPLACE_ISFINITE = 1]) +gl_MATH_MODULE_INDICATOR([isfinite-no-cxx]) + +Makefile.am: +if GL_COND_OBJ_ISFINITE +lib_SOURCES += isfinite.c +endif + +Include: +<math.h> + +License: +LGPL + +Maintainer: +Ben Pfaff diff --git a/modules/isfinite-tests b/modules/isfinite-no-c++-tests similarity index 100% rename from modules/isfinite-tests rename to modules/isfinite-no-c++-tests diff --git a/modules/logb b/modules/logb index a7dcb2072e..ea2013ed66 100644 --- a/modules/logb +++ b/modules/logb @@ -9,7 +9,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -isfinite [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1] +isfinite-no-c++ [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1] frexp [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1] isnand [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1] diff --git a/modules/logbf b/modules/logbf index 9e633c95dd..9ea26b7ac4 100644 --- a/modules/logbf +++ b/modules/logbf @@ -10,7 +10,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -isfinite [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1] +isfinite-no-c++ [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1] frexpf [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1] isnanf [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1] diff --git a/modules/logbl b/modules/logbl index 6b06090746..6aefe42897 100644 --- a/modules/logbl +++ b/modules/logbl @@ -11,7 +11,7 @@ Depends-on: math-h extensions logb [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -isfinite [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/math-h b/modules/math-h index da3214ad4e..78e94cb01c 100644 --- a/modules/math-h +++ b/modules/math-h @@ -87,6 +87,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \ -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ + -e 's/@''GNULIB_ISFINITE_NO_CXX''@/$(GNULIB_ISFINITE_NO_CXX)/g' \ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ diff --git a/modules/modf b/modules/modf index 2df0419acb..e021c301c3 100644 --- a/modules/modf +++ b/modules/modf @@ -8,7 +8,7 @@ m4/mathfunc.m4 Depends-on: math-h -isfinite [test $REPLACE_MODF = 1] +isfinite-no-c++ [test $REPLACE_MODF = 1] trunc [test $REPLACE_MODF = 1] isinf [test $REPLACE_MODF = 1] diff --git a/modules/modfl b/modules/modfl index c05304337a..92c260e898 100644 --- a/modules/modfl +++ b/modules/modfl @@ -10,7 +10,7 @@ Depends-on: math-h extensions modf [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -isfinite [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] truncl [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isinf [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/remainder b/modules/remainder index e3a1583019..ffad86a8cd 100644 --- a/modules/remainder +++ b/modules/remainder @@ -8,7 +8,7 @@ m4/mathfunc.m4 Depends-on: math-h -isfinite [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] +isfinite-no-c++ [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] signbit [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] fabs [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] fmod [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] diff --git a/modules/remainderf b/modules/remainderf index e75bd1dc04..459681435f 100644 --- a/modules/remainderf +++ b/modules/remainderf @@ -11,7 +11,7 @@ Depends-on: math-h extensions remainder [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] -isfinite [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] +isfinite-no-c++ [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] signbit [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] fabsf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] fmodf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] diff --git a/modules/remainderl b/modules/remainderl index 44bcf06533..5baebf4b27 100644 --- a/modules/remainderl +++ b/modules/remainderl @@ -12,7 +12,7 @@ math-h extensions remainder [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] float-h [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isfinite [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isfinite-no-c++ [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] signbit [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fabsl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fmodl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -- 2.52.0
0002-isinf-no-c-New-module.patch
(text/x-patch, 14.5 KB)
From b368b69ba739fd3a71ca81e7bf20e4bb00b417a2 Mon Sep 17 00:00:00 2001 From: Bruno Haible <[email protected]> Date: Fri, 19 Dec 2025 23:35:28 +0100 Subject: [PATCH 2/4] isinf-no-c++: New module. Reported by G. Branden Robinson <[email protected]> in <https://lists.gnu.org/archive/html/bug-gnulib/2025-12/msg00150.html>. * modules/isinf-no-c++: New file, based on modules/isinf. * modules/isinf: Essentially an alias of isinf-no-c++ now. * modules/isinf-no-c++-tests: Renamed from modules/isinf-tests. * lib/math.in.h (isinf): Test also GNULIB_ISINF_NO_CXX. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISINF_NO_CXX. * modules/math-h (Makefile.am): Substitute GNULIB_ISINF_NO_CXX. * modules/fmod (Depends-on): Add isinf-no-c++. Remove isinf. * modules/fmodl (Depends-on): Likewise. * modules/hypot (Depends-on): Likewise. * modules/hypotl (Depends-on): Likewise. * modules/modf (Depends-on): Likewise. * modules/modfl (Depends-on): Likewise. * modules/remainder (Depends-on): Likewise. * modules/remainderf (Depends-on): Likewise. * modules/remainderl (Depends-on): Likewise. * modules/strtod (Depends-on): Likewise. * modules/strtof (Depends-on): Likewise. * modules/strtold (Depends-on): Likewise. --- ChangeLog | 25 +++++++++++++++++ lib/math.in.h | 4 +-- m4/math_h.m4 | 3 +- modules/fmod | 2 +- modules/fmodl | 2 +- modules/hypot | 2 +- modules/hypotl | 2 +- modules/isinf | 12 +------- modules/isinf-no-c++ | 31 +++++++++++++++++++++ modules/{isinf-tests => isinf-no-c++-tests} | 0 modules/math-h | 1 + modules/modf | 2 +- modules/modfl | 2 +- modules/remainder | 2 +- modules/remainderf | 2 +- modules/remainderl | 2 +- modules/strtod | 2 +- modules/strtof | 2 +- modules/strtold | 2 +- 19 files changed, 74 insertions(+), 26 deletions(-) create mode 100644 modules/isinf-no-c++ rename modules/{isinf-tests => isinf-no-c++-tests} (100%) diff --git a/ChangeLog b/ChangeLog index 8439755c9a..b6dfdd68b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2025-12-19 Bruno Haible <[email protected]> + + isinf-no-c++: New module. + Reported by G. Branden Robinson <[email protected]> in + <https://lists.gnu.org/archive/html/bug-gnulib/2025-12/msg00150.html>. + * modules/isinf-no-c++: New file, based on modules/isinf. + * modules/isinf: Essentially an alias of isinf-no-c++ now. + * modules/isinf-no-c++-tests: Renamed from modules/isinf-tests. + * lib/math.in.h (isinf): Test also GNULIB_ISINF_NO_CXX. + * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize + GNULIB_ISINF_NO_CXX. + * modules/math-h (Makefile.am): Substitute GNULIB_ISINF_NO_CXX. + * modules/fmod (Depends-on): Add isinf-no-c++. Remove isinf. + * modules/fmodl (Depends-on): Likewise. + * modules/hypot (Depends-on): Likewise. + * modules/hypotl (Depends-on): Likewise. + * modules/modf (Depends-on): Likewise. + * modules/modfl (Depends-on): Likewise. + * modules/remainder (Depends-on): Likewise. + * modules/remainderf (Depends-on): Likewise. + * modules/remainderl (Depends-on): Likewise. + * modules/strtod (Depends-on): Likewise. + * modules/strtof (Depends-on): Likewise. + * modules/strtold (Depends-on): Likewise. + 2025-12-19 Bruno Haible <[email protected]> isfinite-no-c++: New module. diff --git a/lib/math.in.h b/lib/math.in.h index 66b23e36ef..30ec254332 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2496,7 +2496,7 @@ _GL_WARN_REAL_FLOATING_DECL (isfinite); #endif -#if @GNULIB_ISINF@ +#if @GNULIB_ISINF@ || @GNULIB_ISINF_NO_CXX@ # if @REPLACE_ISINF@ _GL_EXTERN_C int gl_isinff (float x); _GL_EXTERN_C int gl_isinfd (double x); @@ -2507,7 +2507,7 @@ _GL_EXTERN_C int gl_isinfl (long double x); sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ gl_isinff (x)) # endif -# ifdef __cplusplus +# if @GNULIB_ISINF@ && defined __cplusplus # if defined isinf || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf diff --git a/m4/math_h.m4 b/m4/math_h.m4 index a8cc3c833f..ad07925383 100644 --- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 -# serial 143 +# serial 144 dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -133,6 +133,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS] gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE_NO_CXX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF_NO_CXX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND]) diff --git a/modules/fmod b/modules/fmod index 7d271bfb78..54b0a8a350 100644 --- a/modules/fmod +++ b/modules/fmod @@ -15,7 +15,7 @@ frexp [test $REPLACE_FMOD = 1] trunc [test $REPLACE_FMOD = 1] ldexp [test $REPLACE_FMOD = 1] isnand [test $REPLACE_FMOD = 1] -isinf [test $REPLACE_FMOD = 1] +isinf-no-c++ [test $REPLACE_FMOD = 1] configure.ac: gl_FUNC_FMOD diff --git a/modules/fmodl b/modules/fmodl index 1a9ad6fbb2..f4835f1e51 100644 --- a/modules/fmodl +++ b/modules/fmodl @@ -19,7 +19,7 @@ frexpl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $H truncl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] ldexpl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isinf [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isinf-no-c++ [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_FMODL diff --git a/modules/hypot b/modules/hypot index 9e6fdc8432..001599bc24 100644 --- a/modules/hypot +++ b/modules/hypot @@ -14,7 +14,7 @@ fabs [test $REPLACE_HYPOT = 1] frexp [test $REPLACE_HYPOT = 1] ldexp [test $REPLACE_HYPOT = 1] sqrt [test $REPLACE_HYPOT = 1] -isinf [test $REPLACE_HYPOT = 1] +isinf-no-c++ [test $REPLACE_HYPOT = 1] configure.ac: gl_FUNC_HYPOT diff --git a/modules/hypotl b/modules/hypotl index 8668724228..62b42e8a61 100644 --- a/modules/hypotl +++ b/modules/hypotl @@ -15,7 +15,7 @@ fabsl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test frexpl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] ldexpl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] sqrtl [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isinf [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isinf-no-c++ [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_HYPOTL diff --git a/modules/isinf b/modules/isinf index 6a9800460f..70d7403bb4 100644 --- a/modules/isinf +++ b/modules/isinf @@ -2,24 +2,14 @@ Description: isinf macro: test for positive or negative infinity Files: -lib/isinf.c -m4/isinf.m4 -m4/check-math-lib.m4 Depends-on: -math-h -extensions -float-h [test $REPLACE_ISINF = 1] +isinf-no-c++ configure.ac: -gl_ISINF -gl_CONDITIONAL([GL_COND_OBJ_ISINF], [test $REPLACE_ISINF = 1]) gl_MATH_MODULE_INDICATOR([isinf]) Makefile.am: -if GL_COND_OBJ_ISINF -lib_SOURCES += isinf.c -endif Include: <math.h> diff --git a/modules/isinf-no-c++ b/modules/isinf-no-c++ new file mode 100644 index 0000000000..288a0ab84b --- /dev/null +++ b/modules/isinf-no-c++ @@ -0,0 +1,31 @@ +Description: +isinf macro: test for positive or negative infinity + +Files: +lib/isinf.c +m4/isinf.m4 +m4/check-math-lib.m4 + +Depends-on: +math-h +extensions +float-h [test $REPLACE_ISINF = 1] + +configure.ac: +gl_ISINF +gl_CONDITIONAL([GL_COND_OBJ_ISINF], [test $REPLACE_ISINF = 1]) +gl_MATH_MODULE_INDICATOR([isinf-no-cxx]) + +Makefile.am: +if GL_COND_OBJ_ISINF +lib_SOURCES += isinf.c +endif + +Include: +<math.h> + +License: +LGPL + +Maintainer: +Ben Pfaff diff --git a/modules/isinf-tests b/modules/isinf-no-c++-tests similarity index 100% rename from modules/isinf-tests rename to modules/isinf-no-c++-tests diff --git a/modules/math-h b/modules/math-h index 78e94cb01c..982cba2880 100644 --- a/modules/math-h +++ b/modules/math-h @@ -89,6 +89,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ -e 's/@''GNULIB_ISFINITE_NO_CXX''@/$(GNULIB_ISFINITE_NO_CXX)/g' \ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ + -e 's/@''GNULIB_ISINF_NO_CXX''@/$(GNULIB_ISINF_NO_CXX)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ diff --git a/modules/modf b/modules/modf index e021c301c3..b4783d0dee 100644 --- a/modules/modf +++ b/modules/modf @@ -10,7 +10,7 @@ Depends-on: math-h isfinite-no-c++ [test $REPLACE_MODF = 1] trunc [test $REPLACE_MODF = 1] -isinf [test $REPLACE_MODF = 1] +isinf-no-c++ [test $REPLACE_MODF = 1] configure.ac: gl_FUNC_MODF diff --git a/modules/modfl b/modules/modfl index 92c260e898..6384737035 100644 --- a/modules/modfl +++ b/modules/modfl @@ -12,7 +12,7 @@ extensions modf [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] isfinite-no-c++ [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] truncl [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isinf [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isinf-no-c++ [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_MODFL diff --git a/modules/remainder b/modules/remainder index ffad86a8cd..8872083f26 100644 --- a/modules/remainder +++ b/modules/remainder @@ -13,7 +13,7 @@ signbit [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] fabs [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] fmod [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] isnand [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] -isinf [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] +isinf-no-c++ [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] configure.ac: gl_FUNC_REMAINDER diff --git a/modules/remainderf b/modules/remainderf index 459681435f..092bbc9aa1 100644 --- a/modules/remainderf +++ b/modules/remainderf @@ -16,7 +16,7 @@ signbit [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] fabsf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] fmodf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] isnanf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] -isinf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] +isinf-no-c++ [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] configure.ac: gl_FUNC_REMAINDERF diff --git a/modules/remainderl b/modules/remainderl index 5baebf4b27..d76bcc1fa9 100644 --- a/modules/remainderl +++ b/modules/remainderl @@ -17,7 +17,7 @@ signbit [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } fabsl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fmodl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -isinf [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +isinf-no-c++ [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_REMAINDERL diff --git a/modules/strtod b/modules/strtod index aaade58f7c..e1353bc0ad 100644 --- a/modules/strtod +++ b/modules/strtod @@ -12,7 +12,7 @@ strtod-obsolete c-ctype [test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1] math-h [test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1] bool [test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1] -isinf [test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1] +isinf-no-c++ [test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1] configure.ac: gl_FUNC_STRTOD diff --git a/modules/strtof b/modules/strtof index 306e77a040..4850dc30ae 100644 --- a/modules/strtof +++ b/modules/strtof @@ -12,7 +12,7 @@ stdlib-h c-ctype [test $HAVE_STRTOF = 0 || test $REPLACE_STRTOF = 1] math-h [test $HAVE_STRTOF = 0 || test $REPLACE_STRTOF = 1] bool [test $HAVE_STRTOF = 0 || test $REPLACE_STRTOF = 1] -isinf [test $HAVE_STRTOF = 0 || test $REPLACE_STRTOF = 1] +isinf-no-c++ [test $HAVE_STRTOF = 0 || test $REPLACE_STRTOF = 1] configure.ac: gl_FUNC_STRTOF diff --git a/modules/strtold b/modules/strtold index 9cafe3f49a..50b9ee626b 100644 --- a/modules/strtold +++ b/modules/strtold @@ -13,7 +13,7 @@ stdlib-h c-ctype [test $HAVE_STRTOLD = 0 || test $REPLACE_STRTOLD = 1] math-h [test $HAVE_STRTOLD = 0 || test $REPLACE_STRTOLD = 1] bool [test $HAVE_STRTOLD = 0 || test $REPLACE_STRTOLD = 1] -isinf [test $HAVE_STRTOLD = 0 || test $REPLACE_STRTOLD = 1] +isinf-no-c++ [test $HAVE_STRTOLD = 0 || test $REPLACE_STRTOLD = 1] strtod [{ test $HAVE_STRTOLD = 0 || test $REPLACE_STRTOLD = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] configure.ac: -- 2.52.0
0003-isnan-no-c-New-module.patch
(text/x-patch, 5 KB)
From 6f7d98fc9ae6cff837ab46c04cba3de7ce525dbf Mon Sep 17 00:00:00 2001 From: Bruno Haible <[email protected]> Date: Fri, 19 Dec 2025 23:43:17 +0100 Subject: [PATCH 3/4] isnan-no-c++: New module. * modules/isnan-no-c++: New file, based on modules/isnan. * modules/isnan: Essentially an alias of isnan-no-c++ now. * modules/isnan-no-c++-tests: Renamed from modules/isnan-tests. * lib/math.in.h (isnan): Test also GNULIB_ISNAN_NO_CXX. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_ISNAN_NO_CXX. * modules/math-h (Makefile.am): Substitute GNULIB_ISNAN_NO_CXX. --- ChangeLog | 11 ++++++++ lib/math.in.h | 4 +-- m4/math_h.m4 | 3 ++- modules/isnan | 9 +------ modules/isnan-no-c++ | 28 +++++++++++++++++++++ modules/{isnan-tests => isnan-no-c++-tests} | 0 modules/math-h | 1 + 7 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 modules/isnan-no-c++ rename modules/{isnan-tests => isnan-no-c++-tests} (100%) diff --git a/ChangeLog b/ChangeLog index b6dfdd68b9..e45d5ece13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2025-12-19 Bruno Haible <[email protected]> + + isnan-no-c++: New module. + * modules/isnan-no-c++: New file, based on modules/isnan. + * modules/isnan: Essentially an alias of isnan-no-c++ now. + * modules/isnan-no-c++-tests: Renamed from modules/isnan-tests. + * lib/math.in.h (isnan): Test also GNULIB_ISNAN_NO_CXX. + * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize + GNULIB_ISNAN_NO_CXX. + * modules/math-h (Makefile.am): Substitute GNULIB_ISNAN_NO_CXX. + 2025-12-19 Bruno Haible <[email protected]> isinf-no-c++: New module. diff --git a/lib/math.in.h b/lib/math.in.h index 30ec254332..9eb0bbb642 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2611,7 +2611,7 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; #endif /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if @GNULIB_ISNAN@ +#if @GNULIB_ISNAN@ || @GNULIB_ISNAN_NO_CXX@ # if @REPLACE_ISNAN@ /* We can't just use the isnanf macro (e.g.) as exposed by isnanf.h (e.g.) here, because those may end up being macros @@ -2647,7 +2647,7 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ __builtin_isnan ((float)(x))) # endif -# ifdef __cplusplus +# if @GNULIB_ISNAN@ && defined __cplusplus # if defined isnan || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) # undef isnan diff --git a/m4/math_h.m4 b/m4/math_h.m4 index ad07925383..2ff9e25238 100644 --- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 -# serial 144 +# serial 145 dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -135,6 +135,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS] gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF_NO_CXX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN_NO_CXX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL]) diff --git a/modules/isnan b/modules/isnan index ba96eb7c6f..9764e972f8 100644 --- a/modules/isnan +++ b/modules/isnan @@ -2,18 +2,11 @@ Description: isnan macro: test for NaN value. Files: -m4/isnan.m4 Depends-on: -isnanf -isnand -isnanl -math-h -stringeq -extensions +isnan-no-c++ configure.ac: -gl_ISNAN gl_MATH_MODULE_INDICATOR([isnan]) Makefile.am: diff --git a/modules/isnan-no-c++ b/modules/isnan-no-c++ new file mode 100644 index 0000000000..db1ef396a8 --- /dev/null +++ b/modules/isnan-no-c++ @@ -0,0 +1,28 @@ +Description: +isnan macro: test for NaN value. + +Files: +m4/isnan.m4 + +Depends-on: +isnanf +isnand +isnanl +math-h +stringeq +extensions + +configure.ac: +gl_ISNAN +gl_MATH_MODULE_INDICATOR([isnan-no-cxx]) + +Makefile.am: + +Include: +<math.h> + +License: +LGPL + +Maintainer: +Ben Pfaff diff --git a/modules/isnan-tests b/modules/isnan-no-c++-tests similarity index 100% rename from modules/isnan-tests rename to modules/isnan-no-c++-tests diff --git a/modules/math-h b/modules/math-h index 982cba2880..888a9a82cc 100644 --- a/modules/math-h +++ b/modules/math-h @@ -91,6 +91,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ -e 's/@''GNULIB_ISINF_NO_CXX''@/$(GNULIB_ISINF_NO_CXX)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ + -e 's/@''GNULIB_ISNAN_NO_CXX''@/$(GNULIB_ISNAN_NO_CXX)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ -- 2.52.0
0004-signbit-no-c-New-module.patch
(text/x-patch, 53.6 KB)
From 7aa8d8cd87f796ed9b28439d8fb14b2503be0d0b Mon Sep 17 00:00:00 2001 From: Bruno Haible <[email protected]> Date: Sat, 20 Dec 2025 00:02:55 +0100 Subject: [PATCH 4/4] signbit-no-c++: New module. * modules/signbit-no-c++: New file, based on modules/signbit. * modules/signbit: Essentially an alias of signbit-no-c++ now. * modules/signbit-no-c++-tests: Renamed from modules/signbit-tests. * lib/math.in.h (signbit): Test also GNULIB_SIGNBIT_NO_CXX. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_SIGNBIT_NO_CXX. * modules/math-h (Makefile.am): Substitute GNULIB_SIGNBIT_NO_CXX. * modules/copysign (Depends-on): Add signbit-no-c++. Remove signbit. * modules/copysignf (Depends-on): Likewise. * modules/copysignl (Depends-on): Likewise. * modules/fabsl (Depends-on): Likewise. * modules/fmod (Depends-on): Likewise. * modules/fmodl (Depends-on): Likewise. * modules/mixin/printf-posix (Depends-on): Likewise. * modules/remainder (Depends-on): Likewise. * modules/remainderf (Depends-on): Likewise. * modules/remainderl (Depends-on): Likewise. * modules/signed-nan (Depends-on): Likewise. * modules/totalorder (Depends-on): Likewise. * modules/totalorderf (Depends-on): Likewise. * modules/totalorderl (Depends-on): Likewise. * modules/totalordermag (Depends-on): Likewise. * modules/totalordermagf (Depends-on): Likewise. * modules/totalordermagl (Depends-on): Likewise. * modules/c-strtod-tests (Depends-on): Likewise. * modules/c-strtof-tests (Depends-on): Likewise. * modules/c-strtold-tests (Depends-on): Likewise. * modules/cbrt-ieee-tests (Depends-on): Likewise. * modules/cbrtf-ieee-tests (Depends-on): Likewise. * modules/cbrtl-ieee-tests (Depends-on): Likewise. * modules/ceil-ieee-tests (Depends-on): Likewise. * modules/ceilf-ieee-tests (Depends-on): Likewise. * modules/ceill-ieee-tests (Depends-on): Likewise. * modules/exp-ieee-tests (Depends-on): Likewise. * modules/exp2-ieee-tests (Depends-on): Likewise. * modules/exp2f-ieee-tests (Depends-on): Likewise. * modules/exp2l-ieee-tests (Depends-on): Likewise. * modules/expf-ieee-tests (Depends-on): Likewise. * modules/expl-ieee-tests (Depends-on): Likewise. * modules/expm1-ieee-tests (Depends-on): Likewise. * modules/expm1f-ieee-tests (Depends-on): Likewise. * modules/expm1l-ieee-tests (Depends-on): Likewise. * modules/fabs-ieee-tests (Depends-on): Likewise. * modules/fabs-tests (Depends-on): Likewise. * modules/fabsf-ieee-tests (Depends-on): Likewise. * modules/fabsf-tests (Depends-on): Likewise. * modules/fabsl-ieee-tests (Depends-on): Likewise. * modules/fabsl-tests (Depends-on): Likewise. * modules/floor-ieee-tests (Depends-on): Likewise. * modules/floorf-ieee-tests (Depends-on): Likewise. * modules/floorl-ieee-tests (Depends-on): Likewise. * modules/fmod-ieee-tests (Depends-on): Likewise. * modules/fmodf-ieee-tests (Depends-on): Likewise. * modules/fmodl-ieee-tests (Depends-on): Likewise. * modules/frexp-ieee-tests (Depends-on): Likewise. * modules/frexp-nolibm-tests (Depends-on): Likewise. * modules/frexp-tests (Depends-on): Likewise. * modules/frexpf-ieee-tests (Depends-on): Likewise. * modules/frexpf-tests (Depends-on): Likewise. * modules/frexpl-ieee-tests (Depends-on): Likewise. * modules/frexpl-nolibm-tests (Depends-on): Likewise. * modules/frexpl-tests (Depends-on): Likewise. * modules/hypot-ieee-tests (Depends-on): Likewise. * modules/hypotf-ieee-tests (Depends-on): Likewise. * modules/hypotl-ieee-tests (Depends-on): Likewise. * modules/ldexp-ieee-tests (Depends-on): Likewise. * modules/ldexp-tests (Depends-on): Likewise. * modules/ldexpf-ieee-tests (Depends-on): Likewise. * modules/ldexpf-tests (Depends-on): Likewise. * modules/ldexpl-ieee-tests (Depends-on): Likewise. * modules/ldexpl-tests (Depends-on): Likewise. * modules/log-ieee-tests (Depends-on): Likewise. * modules/log10-ieee-tests (Depends-on): Likewise. * modules/log10f-ieee-tests (Depends-on): Likewise. * modules/log10l-ieee-tests (Depends-on): Likewise. * modules/log1p-ieee-tests (Depends-on): Likewise. * modules/log1pf-ieee-tests (Depends-on): Likewise. * modules/log1pl-ieee-tests (Depends-on): Likewise. * modules/log2-ieee-tests (Depends-on): Likewise. * modules/log2f-ieee-tests (Depends-on): Likewise. * modules/log2l-ieee-tests (Depends-on): Likewise. * modules/logb-ieee-tests (Depends-on): Likewise. * modules/logbf-ieee-tests (Depends-on): Likewise. * modules/logbl-ieee-tests (Depends-on): Likewise. * modules/logf-ieee-tests (Depends-on): Likewise. * modules/logl-ieee-tests (Depends-on): Likewise. * modules/modf-ieee-tests (Depends-on): Likewise. * modules/modff-ieee-tests (Depends-on): Likewise. * modules/modfl-ieee-tests (Depends-on): Likewise. * modules/remainder-ieee-tests (Depends-on): Likewise. * modules/remainderf-ieee-tests (Depends-on): Likewise. * modules/remainderl-ieee-tests (Depends-on): Likewise. * modules/rint-ieee-tests (Depends-on): Likewise. * modules/rintf-ieee-tests (Depends-on): Likewise. * modules/rintl-ieee-tests (Depends-on): Likewise. * modules/round-ieee-tests (Depends-on): Likewise. * modules/roundf-ieee-tests (Depends-on): Likewise. * modules/roundl-ieee-tests (Depends-on): Likewise. * modules/sqrt-ieee-tests (Depends-on): Likewise. * modules/sqrtf-ieee-tests (Depends-on): Likewise. * modules/sqrtl-ieee-tests (Depends-on): Likewise. * modules/strtod-tests (Depends-on): Likewise. * modules/strtof-tests (Depends-on): Likewise. * modules/strtold-tests (Depends-on): Likewise. * modules/trunc-ieee-tests (Depends-on): Likewise. * modules/truncf-ieee-tests (Depends-on): Likewise. * modules/truncl-ieee-tests (Depends-on): Likewise. * modules/xstrtod-tests (Depends-on): Likewise. * modules/xstrtold-tests (Depends-on): Likewise. --- ChangeLog | 113 ++++++++++++++++++ lib/math.in.h | 4 +- m4/math_h.m4 | 3 +- modules/c-strtod-tests | 2 +- modules/c-strtof-tests | 2 +- modules/c-strtold-tests | 2 +- modules/cbrt-ieee-tests | 2 +- modules/cbrtf-ieee-tests | 2 +- modules/cbrtl-ieee-tests | 2 +- modules/ceil-ieee-tests | 2 +- modules/ceilf-ieee-tests | 2 +- modules/ceill-ieee-tests | 2 +- modules/copysign | 2 +- modules/copysignf | 2 +- modules/copysignl | 2 +- modules/exp-ieee-tests | 2 +- modules/exp2-ieee-tests | 2 +- modules/exp2f-ieee-tests | 2 +- modules/exp2l-ieee-tests | 2 +- modules/expf-ieee-tests | 2 +- modules/expl-ieee-tests | 2 +- modules/expm1-ieee-tests | 2 +- modules/expm1f-ieee-tests | 2 +- modules/expm1l-ieee-tests | 2 +- modules/fabs-ieee-tests | 2 +- modules/fabs-tests | 2 +- modules/fabsf-ieee-tests | 2 +- modules/fabsf-tests | 2 +- modules/fabsl | 2 +- modules/fabsl-ieee-tests | 2 +- modules/fabsl-tests | 2 +- modules/floor-ieee-tests | 2 +- modules/floorf-ieee-tests | 2 +- modules/floorl-ieee-tests | 2 +- modules/fmod | 2 +- modules/fmod-ieee-tests | 2 +- modules/fmodf-ieee-tests | 2 +- modules/fmodl | 2 +- modules/fmodl-ieee-tests | 2 +- modules/frexp-ieee-tests | 2 +- modules/frexp-nolibm-tests | 2 +- modules/frexp-tests | 2 +- modules/frexpf-ieee-tests | 2 +- modules/frexpf-tests | 2 +- modules/frexpl-ieee-tests | 2 +- modules/frexpl-nolibm-tests | 2 +- modules/frexpl-tests | 2 +- modules/hypot-ieee-tests | 2 +- modules/hypotf-ieee-tests | 2 +- modules/hypotl-ieee-tests | 2 +- modules/ldexp-ieee-tests | 2 +- modules/ldexp-tests | 2 +- modules/ldexpf-ieee-tests | 2 +- modules/ldexpf-tests | 2 +- modules/ldexpl-ieee-tests | 2 +- modules/ldexpl-tests | 2 +- modules/log-ieee-tests | 2 +- modules/log10-ieee-tests | 2 +- modules/log10f-ieee-tests | 2 +- modules/log10l-ieee-tests | 2 +- modules/log1p-ieee-tests | 2 +- modules/log1pf-ieee-tests | 2 +- modules/log1pl-ieee-tests | 2 +- modules/log2-ieee-tests | 2 +- modules/log2f-ieee-tests | 2 +- modules/log2l-ieee-tests | 2 +- modules/logb-ieee-tests | 2 +- modules/logbf-ieee-tests | 2 +- modules/logbl-ieee-tests | 2 +- modules/logf-ieee-tests | 2 +- modules/logl-ieee-tests | 2 +- modules/math-h | 1 + modules/mixin/printf-posix | 2 +- modules/modf-ieee-tests | 2 +- modules/modff-ieee-tests | 2 +- modules/modfl-ieee-tests | 2 +- modules/remainder | 2 +- modules/remainder-ieee-tests | 2 +- modules/remainderf | 2 +- modules/remainderf-ieee-tests | 2 +- modules/remainderl | 2 +- modules/remainderl-ieee-tests | 2 +- modules/rint-ieee-tests | 2 +- modules/rintf-ieee-tests | 2 +- modules/rintl-ieee-tests | 2 +- modules/round-ieee-tests | 2 +- modules/roundf-ieee-tests | 2 +- modules/roundl-ieee-tests | 2 +- modules/signbit | 19 +-- modules/signbit-no-c++ | 38 ++++++ .../{signbit-tests => signbit-no-c++-tests} | 0 modules/signed-nan | 2 +- modules/sqrt-ieee-tests | 2 +- modules/sqrtf-ieee-tests | 2 +- modules/sqrtl-ieee-tests | 2 +- modules/strtod-tests | 2 +- modules/strtof-tests | 2 +- modules/strtold-tests | 2 +- modules/totalorder | 2 +- modules/totalorderf | 2 +- modules/totalorderl | 2 +- modules/totalordermag | 2 +- modules/totalordermagf | 2 +- modules/totalordermagl | 2 +- modules/trunc-ieee-tests | 2 +- modules/truncf-ieee-tests | 2 +- modules/truncl-ieee-tests | 2 +- modules/xstrtod-tests | 2 +- modules/xstrtold-tests | 2 +- 109 files changed, 259 insertions(+), 123 deletions(-) create mode 100644 modules/signbit-no-c++ rename modules/{signbit-tests => signbit-no-c++-tests} (100%) diff --git a/ChangeLog b/ChangeLog index e45d5ece13..d3891a103f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,116 @@ +2025-12-19 Bruno Haible <[email protected]> + + signbit-no-c++: New module. + * modules/signbit-no-c++: New file, based on modules/signbit. + * modules/signbit: Essentially an alias of signbit-no-c++ now. + * modules/signbit-no-c++-tests: Renamed from modules/signbit-tests. + * lib/math.in.h (signbit): Test also GNULIB_SIGNBIT_NO_CXX. + * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize + GNULIB_SIGNBIT_NO_CXX. + * modules/math-h (Makefile.am): Substitute GNULIB_SIGNBIT_NO_CXX. + * modules/copysign (Depends-on): Add signbit-no-c++. Remove signbit. + * modules/copysignf (Depends-on): Likewise. + * modules/copysignl (Depends-on): Likewise. + * modules/fabsl (Depends-on): Likewise. + * modules/fmod (Depends-on): Likewise. + * modules/fmodl (Depends-on): Likewise. + * modules/mixin/printf-posix (Depends-on): Likewise. + * modules/remainder (Depends-on): Likewise. + * modules/remainderf (Depends-on): Likewise. + * modules/remainderl (Depends-on): Likewise. + * modules/signed-nan (Depends-on): Likewise. + * modules/totalorder (Depends-on): Likewise. + * modules/totalorderf (Depends-on): Likewise. + * modules/totalorderl (Depends-on): Likewise. + * modules/totalordermag (Depends-on): Likewise. + * modules/totalordermagf (Depends-on): Likewise. + * modules/totalordermagl (Depends-on): Likewise. + * modules/c-strtod-tests (Depends-on): Likewise. + * modules/c-strtof-tests (Depends-on): Likewise. + * modules/c-strtold-tests (Depends-on): Likewise. + * modules/cbrt-ieee-tests (Depends-on): Likewise. + * modules/cbrtf-ieee-tests (Depends-on): Likewise. + * modules/cbrtl-ieee-tests (Depends-on): Likewise. + * modules/ceil-ieee-tests (Depends-on): Likewise. + * modules/ceilf-ieee-tests (Depends-on): Likewise. + * modules/ceill-ieee-tests (Depends-on): Likewise. + * modules/exp-ieee-tests (Depends-on): Likewise. + * modules/exp2-ieee-tests (Depends-on): Likewise. + * modules/exp2f-ieee-tests (Depends-on): Likewise. + * modules/exp2l-ieee-tests (Depends-on): Likewise. + * modules/expf-ieee-tests (Depends-on): Likewise. + * modules/expl-ieee-tests (Depends-on): Likewise. + * modules/expm1-ieee-tests (Depends-on): Likewise. + * modules/expm1f-ieee-tests (Depends-on): Likewise. + * modules/expm1l-ieee-tests (Depends-on): Likewise. + * modules/fabs-ieee-tests (Depends-on): Likewise. + * modules/fabs-tests (Depends-on): Likewise. + * modules/fabsf-ieee-tests (Depends-on): Likewise. + * modules/fabsf-tests (Depends-on): Likewise. + * modules/fabsl-ieee-tests (Depends-on): Likewise. + * modules/fabsl-tests (Depends-on): Likewise. + * modules/floor-ieee-tests (Depends-on): Likewise. + * modules/floorf-ieee-tests (Depends-on): Likewise. + * modules/floorl-ieee-tests (Depends-on): Likewise. + * modules/fmod-ieee-tests (Depends-on): Likewise. + * modules/fmodf-ieee-tests (Depends-on): Likewise. + * modules/fmodl-ieee-tests (Depends-on): Likewise. + * modules/frexp-ieee-tests (Depends-on): Likewise. + * modules/frexp-nolibm-tests (Depends-on): Likewise. + * modules/frexp-tests (Depends-on): Likewise. + * modules/frexpf-ieee-tests (Depends-on): Likewise. + * modules/frexpf-tests (Depends-on): Likewise. + * modules/frexpl-ieee-tests (Depends-on): Likewise. + * modules/frexpl-nolibm-tests (Depends-on): Likewise. + * modules/frexpl-tests (Depends-on): Likewise. + * modules/hypot-ieee-tests (Depends-on): Likewise. + * modules/hypotf-ieee-tests (Depends-on): Likewise. + * modules/hypotl-ieee-tests (Depends-on): Likewise. + * modules/ldexp-ieee-tests (Depends-on): Likewise. + * modules/ldexp-tests (Depends-on): Likewise. + * modules/ldexpf-ieee-tests (Depends-on): Likewise. + * modules/ldexpf-tests (Depends-on): Likewise. + * modules/ldexpl-ieee-tests (Depends-on): Likewise. + * modules/ldexpl-tests (Depends-on): Likewise. + * modules/log-ieee-tests (Depends-on): Likewise. + * modules/log10-ieee-tests (Depends-on): Likewise. + * modules/log10f-ieee-tests (Depends-on): Likewise. + * modules/log10l-ieee-tests (Depends-on): Likewise. + * modules/log1p-ieee-tests (Depends-on): Likewise. + * modules/log1pf-ieee-tests (Depends-on): Likewise. + * modules/log1pl-ieee-tests (Depends-on): Likewise. + * modules/log2-ieee-tests (Depends-on): Likewise. + * modules/log2f-ieee-tests (Depends-on): Likewise. + * modules/log2l-ieee-tests (Depends-on): Likewise. + * modules/logb-ieee-tests (Depends-on): Likewise. + * modules/logbf-ieee-tests (Depends-on): Likewise. + * modules/logbl-ieee-tests (Depends-on): Likewise. + * modules/logf-ieee-tests (Depends-on): Likewise. + * modules/logl-ieee-tests (Depends-on): Likewise. + * modules/modf-ieee-tests (Depends-on): Likewise. + * modules/modff-ieee-tests (Depends-on): Likewise. + * modules/modfl-ieee-tests (Depends-on): Likewise. + * modules/remainder-ieee-tests (Depends-on): Likewise. + * modules/remainderf-ieee-tests (Depends-on): Likewise. + * modules/remainderl-ieee-tests (Depends-on): Likewise. + * modules/rint-ieee-tests (Depends-on): Likewise. + * modules/rintf-ieee-tests (Depends-on): Likewise. + * modules/rintl-ieee-tests (Depends-on): Likewise. + * modules/round-ieee-tests (Depends-on): Likewise. + * modules/roundf-ieee-tests (Depends-on): Likewise. + * modules/roundl-ieee-tests (Depends-on): Likewise. + * modules/sqrt-ieee-tests (Depends-on): Likewise. + * modules/sqrtf-ieee-tests (Depends-on): Likewise. + * modules/sqrtl-ieee-tests (Depends-on): Likewise. + * modules/strtod-tests (Depends-on): Likewise. + * modules/strtof-tests (Depends-on): Likewise. + * modules/strtold-tests (Depends-on): Likewise. + * modules/trunc-ieee-tests (Depends-on): Likewise. + * modules/truncf-ieee-tests (Depends-on): Likewise. + * modules/truncl-ieee-tests (Depends-on): Likewise. + * modules/xstrtod-tests (Depends-on): Likewise. + * modules/xstrtold-tests (Depends-on): Likewise. + 2025-12-19 Bruno Haible <[email protected]> isnan-no-c++: New module. diff --git a/lib/math.in.h b/lib/math.in.h index 9eb0bbb642..650ce80a5a 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2681,7 +2681,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); #endif -#if @GNULIB_SIGNBIT@ +#if @GNULIB_SIGNBIT@ || @GNULIB_SIGNBIT_NO_CXX@ # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \ && (!defined __cplusplus || __cplusplus < 201103)) # undef signbit @@ -2739,7 +2739,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); gl_signbitf (x)) # define GNULIB_defined_signbit 1 # endif -# ifdef __cplusplus +# if @GNULIB_SIGNBIT@ && defined __cplusplus # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit diff --git a/m4/math_h.m4 b/m4/math_h.m4 index 2ff9e25238..c8a01186f0 100644 --- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 -# serial 145 +# serial 146 dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -180,6 +180,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS] gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGL]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT_NO_CXX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINHF]) diff --git a/modules/c-strtod-tests b/modules/c-strtod-tests index 8a9f44321d..7dd3e9e00a 100644 --- a/modules/c-strtod-tests +++ b/modules/c-strtod-tests @@ -13,7 +13,7 @@ m4/codeset.m4 Depends-on: float-h isnand-nolibm -signbit +signbit-no-c++ setlocale thread nanosleep diff --git a/modules/c-strtof-tests b/modules/c-strtof-tests index 225d95fd64..60025cabcf 100644 --- a/modules/c-strtof-tests +++ b/modules/c-strtof-tests @@ -13,7 +13,7 @@ m4/codeset.m4 Depends-on: float-h isnanf-nolibm -signbit +signbit-no-c++ setlocale thread nanosleep diff --git a/modules/c-strtold-tests b/modules/c-strtold-tests index 823ba69c6d..c8760b00f0 100644 --- a/modules/c-strtold-tests +++ b/modules/c-strtold-tests @@ -13,7 +13,7 @@ m4/codeset.m4 Depends-on: float-h isnanl-nolibm -signbit +signbit-no-c++ setlocale thread nanosleep diff --git a/modules/cbrt-ieee-tests b/modules/cbrt-ieee-tests index 13431606ce..37d636afc9 100644 --- a/modules/cbrt-ieee-tests +++ b/modules/cbrt-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/cbrtf-ieee-tests b/modules/cbrtf-ieee-tests index 870b17e55b..674e591918 100644 --- a/modules/cbrtf-ieee-tests +++ b/modules/cbrtf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/cbrtl-ieee-tests b/modules/cbrtl-ieee-tests index 36edb9b454..738464a132 100644 --- a/modules/cbrtl-ieee-tests +++ b/modules/cbrtl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ceil-ieee-tests b/modules/ceil-ieee-tests index 811f1f38d7..8011f8b985 100644 --- a/modules/ceil-ieee-tests +++ b/modules/ceil-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ceilf-ieee-tests b/modules/ceilf-ieee-tests index 86327a6750..f208d14a52 100644 --- a/modules/ceilf-ieee-tests +++ b/modules/ceilf-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ceill-ieee-tests b/modules/ceill-ieee-tests index 4bd4a98000..6d9437b30e 100644 --- a/modules/ceill-ieee-tests +++ b/modules/ceill-ieee-tests @@ -9,7 +9,7 @@ fpucw isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/copysign b/modules/copysign index 39a7842e92..97f9d1a0b4 100644 --- a/modules/copysign +++ b/modules/copysign @@ -8,7 +8,7 @@ m4/mathfunc.m4 Depends-on: math-h -signbit [test $HAVE_COPYSIGN = 0] +signbit-no-c++ [test $HAVE_COPYSIGN = 0] configure.ac: gl_FUNC_COPYSIGN diff --git a/modules/copysignf b/modules/copysignf index 5ef8e4af02..5725d9b4c1 100644 --- a/modules/copysignf +++ b/modules/copysignf @@ -9,7 +9,7 @@ m4/mathfunc.m4 Depends-on: math-h extensions -signbit [test $HAVE_COPYSIGNF = 0] +signbit-no-c++ [test $HAVE_COPYSIGNF = 0] configure.ac: gl_FUNC_COPYSIGNF diff --git a/modules/copysignl b/modules/copysignl index 55278fb6df..53e931b4b8 100644 --- a/modules/copysignl +++ b/modules/copysignl @@ -10,7 +10,7 @@ Depends-on: math-h extensions copysign [test $HAVE_COPYSIGNL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -signbit [test $HAVE_COPYSIGNL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +signbit-no-c++ [test $HAVE_COPYSIGNL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_COPYSIGNL diff --git a/modules/exp-ieee-tests b/modules/exp-ieee-tests index b08529863d..24eb29063e 100644 --- a/modules/exp-ieee-tests +++ b/modules/exp-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/exp2-ieee-tests b/modules/exp2-ieee-tests index dd82010855..4bec1a6fb2 100644 --- a/modules/exp2-ieee-tests +++ b/modules/exp2-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/exp2f-ieee-tests b/modules/exp2f-ieee-tests index 2329697ff1..7a549eb3c4 100644 --- a/modules/exp2f-ieee-tests +++ b/modules/exp2f-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/exp2l-ieee-tests b/modules/exp2l-ieee-tests index f2e3ac1607..755d2cd811 100644 --- a/modules/exp2l-ieee-tests +++ b/modules/exp2l-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/expf-ieee-tests b/modules/expf-ieee-tests index 87d53afcb3..8f249b8ee9 100644 --- a/modules/expf-ieee-tests +++ b/modules/expf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/expl-ieee-tests b/modules/expl-ieee-tests index 157853ec7a..9939062430 100644 --- a/modules/expl-ieee-tests +++ b/modules/expl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/expm1-ieee-tests b/modules/expm1-ieee-tests index 1419c283d9..b24da31681 100644 --- a/modules/expm1-ieee-tests +++ b/modules/expm1-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/expm1f-ieee-tests b/modules/expm1f-ieee-tests index 7e0ae0e113..ca3fdc0872 100644 --- a/modules/expm1f-ieee-tests +++ b/modules/expm1f-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/expm1l-ieee-tests b/modules/expm1l-ieee-tests index 02c77c284b..069d8abff6 100644 --- a/modules/expm1l-ieee-tests +++ b/modules/expm1l-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fabs-ieee-tests b/modules/fabs-ieee-tests index 3a97f55560..fe4d56d058 100644 --- a/modules/fabs-ieee-tests +++ b/modules/fabs-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fabs-tests b/modules/fabs-tests index 3468c3494a..5b45be3bd1 100644 --- a/modules/fabs-tests +++ b/modules/fabs-tests @@ -7,7 +7,7 @@ tests/macros.h tests/randomd.c Depends-on: -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fabsf-ieee-tests b/modules/fabsf-ieee-tests index af4e5e564d..09431d98da 100644 --- a/modules/fabsf-ieee-tests +++ b/modules/fabsf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fabsf-tests b/modules/fabsf-tests index 6a66922c56..f3cc00e06a 100644 --- a/modules/fabsf-tests +++ b/modules/fabsf-tests @@ -7,7 +7,7 @@ tests/macros.h tests/randomf.c Depends-on: -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fabsl b/modules/fabsl index fbfaa96f6b..247faf9403 100644 --- a/modules/fabsl +++ b/modules/fabsl @@ -10,7 +10,7 @@ Depends-on: math-h extensions fabs [{ test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] -signbit [{ test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +signbit-no-c++ [{ test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_FABSL diff --git a/modules/fabsl-ieee-tests b/modules/fabsl-ieee-tests index b76b8722fa..841a4f49b2 100644 --- a/modules/fabsl-ieee-tests +++ b/modules/fabsl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fabsl-tests b/modules/fabsl-tests index 2db3a17776..2dd2de14a7 100644 --- a/modules/fabsl-tests +++ b/modules/fabsl-tests @@ -7,7 +7,7 @@ tests/macros.h tests/randoml.c Depends-on: -signbit +signbit-no-c++ configure.ac: diff --git a/modules/floor-ieee-tests b/modules/floor-ieee-tests index e3eb2070e8..d6d96f5b19 100644 --- a/modules/floor-ieee-tests +++ b/modules/floor-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/floorf-ieee-tests b/modules/floorf-ieee-tests index 97af07dee8..0bcacafcbd 100644 --- a/modules/floorf-ieee-tests +++ b/modules/floorf-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/floorl-ieee-tests b/modules/floorl-ieee-tests index db67a4abb0..de789a0abf 100644 --- a/modules/floorl-ieee-tests +++ b/modules/floorl-ieee-tests @@ -9,7 +9,7 @@ fpucw isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fmod b/modules/fmod index 54b0a8a350..12940af6a3 100644 --- a/modules/fmod +++ b/modules/fmod @@ -9,7 +9,7 @@ m4/mathfunc.m4 Depends-on: math-h isfinite-no-c++ [test $REPLACE_FMOD = 1] -signbit [test $REPLACE_FMOD = 1] +signbit-no-c++ [test $REPLACE_FMOD = 1] fabs [test $REPLACE_FMOD = 1] frexp [test $REPLACE_FMOD = 1] trunc [test $REPLACE_FMOD = 1] diff --git a/modules/fmod-ieee-tests b/modules/fmod-ieee-tests index b7303ff0ea..fe47b78ade 100644 --- a/modules/fmod-ieee-tests +++ b/modules/fmod-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fmodf-ieee-tests b/modules/fmodf-ieee-tests index 7f083eba69..6b403e4342 100644 --- a/modules/fmodf-ieee-tests +++ b/modules/fmodf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/fmodl b/modules/fmodl index f4835f1e51..7c5d26724c 100644 --- a/modules/fmodl +++ b/modules/fmodl @@ -13,7 +13,7 @@ extensions fmod [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] float-h [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isfinite-no-c++ [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -signbit [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +signbit-no-c++ [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fabsl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] frexpl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] truncl [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/fmodl-ieee-tests b/modules/fmodl-ieee-tests index 8e072a5125..2b4ea0a2bc 100644 --- a/modules/fmodl-ieee-tests +++ b/modules/fmodl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexp-ieee-tests b/modules/frexp-ieee-tests index fd806713cc..be835d69fe 100644 --- a/modules/frexp-ieee-tests +++ b/modules/frexp-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexp-nolibm-tests b/modules/frexp-nolibm-tests index 333ff3e869..d0ad35da68 100644 --- a/modules/frexp-nolibm-tests +++ b/modules/frexp-nolibm-tests @@ -10,7 +10,7 @@ tests/randomd.c Depends-on: isnand-nolibm nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexp-tests b/modules/frexp-tests index 7e327cbc77..0e43390a6f 100644 --- a/modules/frexp-tests +++ b/modules/frexp-tests @@ -10,7 +10,7 @@ tests/randomd.c Depends-on: isnand-nolibm nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexpf-ieee-tests b/modules/frexpf-ieee-tests index 95d675c656..1b82902d2b 100644 --- a/modules/frexpf-ieee-tests +++ b/modules/frexpf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexpf-tests b/modules/frexpf-tests index 7d92de13b7..00665aac4e 100644 --- a/modules/frexpf-tests +++ b/modules/frexpf-tests @@ -10,7 +10,7 @@ tests/randomf.c Depends-on: isnanf-nolibm nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexpl-ieee-tests b/modules/frexpl-ieee-tests index 40bcb70131..e75cf52d17 100644 --- a/modules/frexpl-ieee-tests +++ b/modules/frexpl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/frexpl-nolibm-tests b/modules/frexpl-nolibm-tests index a3ae1bed45..83bbdf608c 100644 --- a/modules/frexpl-nolibm-tests +++ b/modules/frexpl-nolibm-tests @@ -10,7 +10,7 @@ tests/randoml.c Depends-on: fpucw isnanl-nolibm -signbit +signbit-no-c++ nan configure.ac: diff --git a/modules/frexpl-tests b/modules/frexpl-tests index 3e0159088a..6b1f1e8136 100644 --- a/modules/frexpl-tests +++ b/modules/frexpl-tests @@ -10,7 +10,7 @@ tests/randoml.c Depends-on: fpucw isnanl-nolibm -signbit +signbit-no-c++ float-h nan diff --git a/modules/hypot-ieee-tests b/modules/hypot-ieee-tests index 75138308e7..c434b37b2a 100644 --- a/modules/hypot-ieee-tests +++ b/modules/hypot-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/hypotf-ieee-tests b/modules/hypotf-ieee-tests index a3c7d6557f..3649d3aede 100644 --- a/modules/hypotf-ieee-tests +++ b/modules/hypotf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/hypotl-ieee-tests b/modules/hypotl-ieee-tests index aa58c4f299..5915fa6a8a 100644 --- a/modules/hypotl-ieee-tests +++ b/modules/hypotl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ldexp-ieee-tests b/modules/ldexp-ieee-tests index 5daaefc9d9..c36dd2ee9f 100644 --- a/modules/ldexp-ieee-tests +++ b/modules/ldexp-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ldexp-tests b/modules/ldexp-tests index 4e3900d0a4..f4fa002fa4 100644 --- a/modules/ldexp-tests +++ b/modules/ldexp-tests @@ -9,7 +9,7 @@ tests/randomd.c Depends-on: isnand-nolibm -signbit +signbit-no-c++ float-h nan diff --git a/modules/ldexpf-ieee-tests b/modules/ldexpf-ieee-tests index e65056c3d1..508f0c9dbf 100644 --- a/modules/ldexpf-ieee-tests +++ b/modules/ldexpf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ldexpf-tests b/modules/ldexpf-tests index 6dee889af0..f6938c6946 100644 --- a/modules/ldexpf-tests +++ b/modules/ldexpf-tests @@ -9,7 +9,7 @@ tests/randomf.c Depends-on: isnanf-nolibm -signbit +signbit-no-c++ float-h nan diff --git a/modules/ldexpl-ieee-tests b/modules/ldexpl-ieee-tests index 2fbbfbbeb0..891f3736b8 100644 --- a/modules/ldexpl-ieee-tests +++ b/modules/ldexpl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/ldexpl-tests b/modules/ldexpl-tests index ec04985ff0..14f02a4e7a 100644 --- a/modules/ldexpl-tests +++ b/modules/ldexpl-tests @@ -10,7 +10,7 @@ tests/randoml.c Depends-on: fpucw isnanl-nolibm -signbit +signbit-no-c++ float-h nan diff --git a/modules/log-ieee-tests b/modules/log-ieee-tests index 5228804faa..7188233bbe 100644 --- a/modules/log-ieee-tests +++ b/modules/log-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log10-ieee-tests b/modules/log10-ieee-tests index 73b93b1592..d49d0f1f8d 100644 --- a/modules/log10-ieee-tests +++ b/modules/log10-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log10f-ieee-tests b/modules/log10f-ieee-tests index 6f3ef66611..8f5a2d1d42 100644 --- a/modules/log10f-ieee-tests +++ b/modules/log10f-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log10l-ieee-tests b/modules/log10l-ieee-tests index 1fc171cc76..a3c3d67762 100644 --- a/modules/log10l-ieee-tests +++ b/modules/log10l-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log1p-ieee-tests b/modules/log1p-ieee-tests index e8e039733f..a9ee1a1a01 100644 --- a/modules/log1p-ieee-tests +++ b/modules/log1p-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log1pf-ieee-tests b/modules/log1pf-ieee-tests index bf103916d0..0bac86fa56 100644 --- a/modules/log1pf-ieee-tests +++ b/modules/log1pf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log1pl-ieee-tests b/modules/log1pl-ieee-tests index 0ac3b7c80b..182eb0ea19 100644 --- a/modules/log1pl-ieee-tests +++ b/modules/log1pl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log2-ieee-tests b/modules/log2-ieee-tests index 221b544c66..8a6a0f3365 100644 --- a/modules/log2-ieee-tests +++ b/modules/log2-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log2f-ieee-tests b/modules/log2f-ieee-tests index 8cb713035c..2995afb122 100644 --- a/modules/log2f-ieee-tests +++ b/modules/log2f-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/log2l-ieee-tests b/modules/log2l-ieee-tests index bfdf53a34b..1ff487e1ce 100644 --- a/modules/log2l-ieee-tests +++ b/modules/log2l-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/logb-ieee-tests b/modules/logb-ieee-tests index 826d8e1502..58c1997997 100644 --- a/modules/logb-ieee-tests +++ b/modules/logb-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/logbf-ieee-tests b/modules/logbf-ieee-tests index a14017fa81..362b392f25 100644 --- a/modules/logbf-ieee-tests +++ b/modules/logbf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/logbl-ieee-tests b/modules/logbl-ieee-tests index f4189abdb7..67d63a1f29 100644 --- a/modules/logbl-ieee-tests +++ b/modules/logbl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/logf-ieee-tests b/modules/logf-ieee-tests index a8d7b8a953..75815da039 100644 --- a/modules/logf-ieee-tests +++ b/modules/logf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/logl-ieee-tests b/modules/logl-ieee-tests index 45ba2b8b04..f088d42a76 100644 --- a/modules/logl-ieee-tests +++ b/modules/logl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/math-h b/modules/math-h index 888a9a82cc..2aebc77bc9 100644 --- a/modules/math-h +++ b/modules/math-h @@ -136,6 +136,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_SETPAYLOADSIGF''@/$(GNULIB_SETPAYLOADSIGF)/g' \ -e 's/@''GNULIB_SETPAYLOADSIGL''@/$(GNULIB_SETPAYLOADSIGL)/g' \ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ + -e 's/@''GNULIB_SIGNBIT_NO_CXX''@/$(GNULIB_SIGNBIT_NO_CXX)/g' \ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ diff --git a/modules/mixin/printf-posix b/modules/mixin/printf-posix index f78559142d..9eb26646e1 100644 --- a/modules/mixin/printf-posix +++ b/modules/mixin/printf-posix @@ -11,7 +11,7 @@ frexp-nolibm frexpl-nolibm printf-frexp printf-frexpl -signbit +signbit-no-c++ fpucw configure.ac: diff --git a/modules/modf-ieee-tests b/modules/modf-ieee-tests index 645e2d9708..3da8f4509f 100644 --- a/modules/modf-ieee-tests +++ b/modules/modf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/modff-ieee-tests b/modules/modff-ieee-tests index 52516fa925..bf2e2ec7b7 100644 --- a/modules/modff-ieee-tests +++ b/modules/modff-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/modfl-ieee-tests b/modules/modfl-ieee-tests index 1e5eb75a6e..a4f48df0de 100644 --- a/modules/modfl-ieee-tests +++ b/modules/modfl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/remainder b/modules/remainder index 8872083f26..4d082d8673 100644 --- a/modules/remainder +++ b/modules/remainder @@ -9,7 +9,7 @@ m4/mathfunc.m4 Depends-on: math-h isfinite-no-c++ [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] -signbit [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] +signbit-no-c++ [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] fabs [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] fmod [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] isnand [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1] diff --git a/modules/remainder-ieee-tests b/modules/remainder-ieee-tests index 8ee2fd6571..0158b8ee53 100644 --- a/modules/remainder-ieee-tests +++ b/modules/remainder-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/remainderf b/modules/remainderf index 092bbc9aa1..63f3b49c2e 100644 --- a/modules/remainderf +++ b/modules/remainderf @@ -12,7 +12,7 @@ math-h extensions remainder [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] isfinite-no-c++ [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] -signbit [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] +signbit-no-c++ [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] fabsf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] fmodf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] isnanf [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1] diff --git a/modules/remainderf-ieee-tests b/modules/remainderf-ieee-tests index 97c95caabf..a6b3351580 100644 --- a/modules/remainderf-ieee-tests +++ b/modules/remainderf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/remainderl b/modules/remainderl index d76bcc1fa9..2ea5fec151 100644 --- a/modules/remainderl +++ b/modules/remainderl @@ -13,7 +13,7 @@ extensions remainder [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1] float-h [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isfinite-no-c++ [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -signbit [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +signbit-no-c++ [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fabsl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] fmodl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] diff --git a/modules/remainderl-ieee-tests b/modules/remainderl-ieee-tests index b97940343d..70cc019867 100644 --- a/modules/remainderl-ieee-tests +++ b/modules/remainderl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/rint-ieee-tests b/modules/rint-ieee-tests index eaf80d51e7..47c5a78487 100644 --- a/modules/rint-ieee-tests +++ b/modules/rint-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/rintf-ieee-tests b/modules/rintf-ieee-tests index a8ce07dd59..9805386df9 100644 --- a/modules/rintf-ieee-tests +++ b/modules/rintf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/rintl-ieee-tests b/modules/rintl-ieee-tests index afc4ccf155..3648a5cecc 100644 --- a/modules/rintl-ieee-tests +++ b/modules/rintl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/round-ieee-tests b/modules/round-ieee-tests index dc52bd3158..a024581624 100644 --- a/modules/round-ieee-tests +++ b/modules/round-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/roundf-ieee-tests b/modules/roundf-ieee-tests index c47a8be7c7..d377a3e817 100644 --- a/modules/roundf-ieee-tests +++ b/modules/roundf-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/roundl-ieee-tests b/modules/roundl-ieee-tests index 114988e682..029cca3d17 100644 --- a/modules/roundl-ieee-tests +++ b/modules/roundl-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/signbit b/modules/signbit index 7051c141b6..9315c8bb53 100644 --- a/modules/signbit +++ b/modules/signbit @@ -2,31 +2,14 @@ Description: signbit() macro: Determine the sign bit of a floating-point number. Files: -lib/signbitf.c -lib/signbitd.c -lib/signbitl.c -lib/float+.h -m4/signbit.m4 Depends-on: -math-h -float-h [test $REPLACE_SIGNBIT = 1] -isnanf-nolibm [test $REPLACE_SIGNBIT = 1] -isnand-nolibm [test $REPLACE_SIGNBIT = 1] -isnanl-nolibm [test $REPLACE_SIGNBIT = 1] -fpieee [test $REPLACE_SIGNBIT = 1] -memcmp [test $REPLACE_SIGNBIT = 1] -stringeq [test $REPLACE_SIGNBIT = 1] +signbit-no-c++ configure.ac: -gl_SIGNBIT -gl_CONDITIONAL([GL_COND_OBJ_SIGNBIT3], [test $REPLACE_SIGNBIT = 1]) gl_MATH_MODULE_INDICATOR([signbit]) Makefile.am: -if GL_COND_OBJ_SIGNBIT3 -lib_SOURCES += signbitf.c signbitd.c signbitl.c -endif Include: <math.h> diff --git a/modules/signbit-no-c++ b/modules/signbit-no-c++ new file mode 100644 index 0000000000..cb612c6450 --- /dev/null +++ b/modules/signbit-no-c++ @@ -0,0 +1,38 @@ +Description: +signbit() macro: Determine the sign bit of a floating-point number. + +Files: +lib/signbitf.c +lib/signbitd.c +lib/signbitl.c +lib/float+.h +m4/signbit.m4 + +Depends-on: +math-h +float-h [test $REPLACE_SIGNBIT = 1] +isnanf-nolibm [test $REPLACE_SIGNBIT = 1] +isnand-nolibm [test $REPLACE_SIGNBIT = 1] +isnanl-nolibm [test $REPLACE_SIGNBIT = 1] +fpieee [test $REPLACE_SIGNBIT = 1] +memcmp [test $REPLACE_SIGNBIT = 1] +stringeq [test $REPLACE_SIGNBIT = 1] + +configure.ac: +gl_SIGNBIT +gl_CONDITIONAL([GL_COND_OBJ_SIGNBIT3], [test $REPLACE_SIGNBIT = 1]) +gl_MATH_MODULE_INDICATOR([signbit-no-cxx]) + +Makefile.am: +if GL_COND_OBJ_SIGNBIT3 +lib_SOURCES += signbitf.c signbitd.c signbitl.c +endif + +Include: +<math.h> + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/signbit-tests b/modules/signbit-no-c++-tests similarity index 100% rename from modules/signbit-tests rename to modules/signbit-no-c++-tests diff --git a/modules/signed-nan b/modules/signed-nan index 32c6b457b7..7da33c7bc3 100644 --- a/modules/signed-nan +++ b/modules/signed-nan @@ -6,7 +6,7 @@ lib/signed-nan.h Depends-on: nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/sqrt-ieee-tests b/modules/sqrt-ieee-tests index e68b5a380e..63cb3fc1b5 100644 --- a/modules/sqrt-ieee-tests +++ b/modules/sqrt-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/sqrtf-ieee-tests b/modules/sqrtf-ieee-tests index 40c8eee5d6..99ba570386 100644 --- a/modules/sqrtf-ieee-tests +++ b/modules/sqrtf-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/sqrtl-ieee-tests b/modules/sqrtl-ieee-tests index f89a7db721..bd54c181e0 100644 --- a/modules/sqrtl-ieee-tests +++ b/modules/sqrtl-ieee-tests @@ -9,7 +9,7 @@ Depends-on: isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/strtod-tests b/modules/strtod-tests index 1aa2bb0b5a..e430d7597e 100644 --- a/modules/strtod-tests +++ b/modules/strtod-tests @@ -12,7 +12,7 @@ m4/codeset.m4 Depends-on: float-h isnand-nolibm -signbit +signbit-no-c++ setlocale configure.ac: diff --git a/modules/strtof-tests b/modules/strtof-tests index fbbff405fb..6c5c1e3ce2 100644 --- a/modules/strtof-tests +++ b/modules/strtof-tests @@ -12,7 +12,7 @@ m4/codeset.m4 Depends-on: float-h isnanf-nolibm -signbit +signbit-no-c++ setlocale configure.ac: diff --git a/modules/strtold-tests b/modules/strtold-tests index 06e75ec7ab..25bf5b7eaa 100644 --- a/modules/strtold-tests +++ b/modules/strtold-tests @@ -12,7 +12,7 @@ m4/codeset.m4 Depends-on: float-h isnanl-nolibm -signbit +signbit-no-c++ setlocale configure.ac: diff --git a/modules/totalorder b/modules/totalorder index b8f5496307..caa08826c7 100644 --- a/modules/totalorder +++ b/modules/totalorder @@ -11,7 +11,7 @@ Depends-on: math-h extensions isnand [test $HAVE_TOTALORDER = 0 || test $REPLACE_TOTALORDER = 1] -signbit [test $HAVE_TOTALORDER = 0 || test $REPLACE_TOTALORDER = 1] +signbit-no-c++ [test $HAVE_TOTALORDER = 0 || test $REPLACE_TOTALORDER = 1] configure.ac: gl_FUNC_TOTALORDER diff --git a/modules/totalorderf b/modules/totalorderf index 7918893af5..fef5830bbf 100644 --- a/modules/totalorderf +++ b/modules/totalorderf @@ -11,7 +11,7 @@ Depends-on: math-h extensions isnanf [test $HAVE_TOTALORDERF = 0 || test $REPLACE_TOTALORDERF = 1] -signbit [test $HAVE_TOTALORDERF = 0 || test $REPLACE_TOTALORDERF = 1] +signbit-no-c++ [test $HAVE_TOTALORDERF = 0 || test $REPLACE_TOTALORDERF = 1] configure.ac: gl_FUNC_TOTALORDERF diff --git a/modules/totalorderl b/modules/totalorderl index 3fe5abfc5b..7b5d6ed17a 100644 --- a/modules/totalorderl +++ b/modules/totalorderl @@ -15,7 +15,7 @@ totalorder [{ test $HAVE_TOTALORDERL = 0 || test $REPLACE_TOTALORDERL = 1; float-h [{ test $HAVE_TOTALORDERL = 0 || test $REPLACE_TOTALORDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] bool [{ test $HAVE_TOTALORDERL = 0 || test $REPLACE_TOTALORDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_TOTALORDERL = 0 || test $REPLACE_TOTALORDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -signbit [{ test $HAVE_TOTALORDERL = 0 || test $REPLACE_TOTALORDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +signbit-no-c++ [{ test $HAVE_TOTALORDERL = 0 || test $REPLACE_TOTALORDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_TOTALORDERL diff --git a/modules/totalordermag b/modules/totalordermag index d051a30e25..486eaa3898 100644 --- a/modules/totalordermag +++ b/modules/totalordermag @@ -13,7 +13,7 @@ math-h extensions verify [test $HAVE_TOTALORDERMAG = 0 || test $REPLACE_TOTALORDERMAG = 1] isnand [test $HAVE_TOTALORDERMAG = 0 || test $REPLACE_TOTALORDERMAG = 1] -signbit [test $HAVE_TOTALORDERMAG = 0 || test $REPLACE_TOTALORDERMAG = 1] +signbit-no-c++ [test $HAVE_TOTALORDERMAG = 0 || test $REPLACE_TOTALORDERMAG = 1] configure.ac: gl_FUNC_TOTALORDERMAG diff --git a/modules/totalordermagf b/modules/totalordermagf index 5c80c07b2b..959ff7406c 100644 --- a/modules/totalordermagf +++ b/modules/totalordermagf @@ -13,7 +13,7 @@ math-h extensions verify [test $HAVE_TOTALORDERMAGF = 0 || test $REPLACE_TOTALORDERMAGF = 1] isnanf [test $HAVE_TOTALORDERMAGF = 0 || test $REPLACE_TOTALORDERMAGF = 1] -signbit [test $HAVE_TOTALORDERMAGF = 0 || test $REPLACE_TOTALORDERMAGF = 1] +signbit-no-c++ [test $HAVE_TOTALORDERMAGF = 0 || test $REPLACE_TOTALORDERMAGF = 1] configure.ac: gl_FUNC_TOTALORDERMAGF diff --git a/modules/totalordermagl b/modules/totalordermagl index 6e2707eed3..eb9548a254 100644 --- a/modules/totalordermagl +++ b/modules/totalordermagl @@ -17,7 +17,7 @@ bool [{ test $HAVE_TOTALORDERMAGL = 0 || test $REPLACE_TOTALORDERMAGL stdint-h [{ test $HAVE_TOTALORDERMAGL = 0 || test $REPLACE_TOTALORDERMAGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] verify [{ test $HAVE_TOTALORDERMAGL = 0 || test $REPLACE_TOTALORDERMAGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] isnanl [{ test $HAVE_TOTALORDERMAGL = 0 || test $REPLACE_TOTALORDERMAGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] -signbit [{ test $HAVE_TOTALORDERMAGL = 0 || test $REPLACE_TOTALORDERMAGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] +signbit-no-c++ [{ test $HAVE_TOTALORDERMAGL = 0 || test $REPLACE_TOTALORDERMAGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0] configure.ac: gl_FUNC_TOTALORDERMAGL diff --git a/modules/trunc-ieee-tests b/modules/trunc-ieee-tests index e03e0c5eea..08da2f63dd 100644 --- a/modules/trunc-ieee-tests +++ b/modules/trunc-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnand-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/truncf-ieee-tests b/modules/truncf-ieee-tests index 7d8365be2a..505b3183fc 100644 --- a/modules/truncf-ieee-tests +++ b/modules/truncf-ieee-tests @@ -8,7 +8,7 @@ Depends-on: isnanf-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/truncl-ieee-tests b/modules/truncl-ieee-tests index b8cd0b9afd..07e65238c6 100644 --- a/modules/truncl-ieee-tests +++ b/modules/truncl-ieee-tests @@ -9,7 +9,7 @@ fpucw isnanl-nolibm float-h nan -signbit +signbit-no-c++ configure.ac: diff --git a/modules/xstrtod-tests b/modules/xstrtod-tests index 6cadf0015b..d6ae1b42d9 100644 --- a/modules/xstrtod-tests +++ b/modules/xstrtod-tests @@ -7,7 +7,7 @@ Depends-on: strtod float-h isnand-nolibm -signbit +signbit-no-c++ configure.ac: diff --git a/modules/xstrtold-tests b/modules/xstrtold-tests index 263e88c680..a39d26f8e8 100644 --- a/modules/xstrtold-tests +++ b/modules/xstrtold-tests @@ -7,7 +7,7 @@ Depends-on: strtold float-h isnanl-nolibm -signbit +signbit-no-c++ configure.ac: -- 2.52.0