]> Savannah Git Hosting - gnulib.git/commitdiff
Rename module fenv to fenv-h.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:14:06 +0000 (23:14 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:14:06 +0000 (23:14 +0100)
* modules/fenv-h: Renamed from modules/fenv.
* modules/fenv-h-tests: Renamed from modules/fenv-tests.
* modules/fenv-h-c++-tests: Renamed from modules/fenv-c++-tests.
* tests/test-fenv-h.c: Renamed from tests/test-fenv.c.
* tests/test-fenv-h-c++.cc: Renamed from tests/test-fenv-c++.cc.
* doc/posix-headers/fenv.texi: Update.
* modules/* (Depends-on): Update.
* modules/fenv: New file.

19 files changed:
ChangeLog
doc/posix-headers/fenv.texi
modules/fenv
modules/fenv-c++-tests [deleted file]
modules/fenv-environment
modules/fenv-exceptions-state-c23
modules/fenv-exceptions-state-c99
modules/fenv-exceptions-tracking-c23
modules/fenv-exceptions-tracking-c99
modules/fenv-exceptions-trapping
modules/fenv-h [new file with mode: 0644]
modules/fenv-h-c++-tests [new file with mode: 0644]
modules/fenv-h-tests [new file with mode: 0644]
modules/fenv-rounding
modules/fenv-tests [deleted file]
tests/test-fenv-c++.cc [deleted file]
tests/test-fenv-h-c++.cc [new file with mode: 0644]
tests/test-fenv-h.c [new file with mode: 0644]
tests/test-fenv.c [deleted file]

index 605a4c462c2498b7f01159dc08e4aadcafb65117..309b6ce3f8f62be79c10eabe37fa395073b46955 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       Rename module fenv to fenv-h.
+       * modules/fenv-h: Renamed from modules/fenv.
+       * modules/fenv-h-tests: Renamed from modules/fenv-tests.
+       * modules/fenv-h-c++-tests: Renamed from modules/fenv-c++-tests.
+       * tests/test-fenv-h.c: Renamed from tests/test-fenv.c.
+       * tests/test-fenv-h-c++.cc: Renamed from tests/test-fenv-c++.cc.
+       * doc/posix-headers/fenv.texi: Update.
+       * modules/* (Depends-on): Update.
+       * modules/fenv: New file.
+
 2024-12-27  Bruno Haible  <bruno@clisp.org>
 
        Rename module errno to errno-h.
index 4149021e3cfe1a25210eae4286204b7e09d356b2..7677b3d9aace26f0f71784b605f8d402dd98ecff 100644 (file)
@@ -3,8 +3,8 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html}
 
-Gnulib module: fenv
-@mindex fenv
+Gnulib module: fenv-h
+@mindex fenv-h
 
 Portability problems fixed by Gnulib:
 @itemize
index 6c028188182fbb1fd361e8850a1dbac28e3d2498..3dd3ef09637dddd4c1f368f3c88a0f572a016648 100644 (file)
@@ -1,87 +1,20 @@
 Description:
 A GNU-like <fenv.h>.
-It nearly conforms to C99 and to C23.
+
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'fenv-h' instead.
 
 Files:
-lib/fenv.in.h
-m4/fenv_h.m4
 
 Depends-on:
-gen-header
-include_next
-snippet/c++defs
-snippet/warn-on-use
+fenv-h
 
 configure.ac:
-gl_FENV_H
-gl_FENV_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += fenv.h
-
-# We need the following in order to create an override of <fenv.h>.
-fenv.h: fenv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
-@NMD@  $(AM_V_GEN)$(MKDIR_P) '%reldir%'
-       $(gl_V_at)$(SED_HEADER_STDOUT) \
-             -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-             -e 's/@''HAVE_FENV_H''@/$(HAVE_FENV_H)/g' \
-             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-             -e 's|@''NEXT_FENV_H''@|$(NEXT_FENV_H)|g' \
-             -e 's/@''GNULIB_FECLEAREXCEPT''@/$(GNULIB_FECLEAREXCEPT)/g' \
-             -e 's/@''GNULIB_FEDISABLEEXCEPT''@/$(GNULIB_FEDISABLEEXCEPT)/g' \
-             -e 's/@''GNULIB_FEENABLEEXCEPT''@/$(GNULIB_FEENABLEEXCEPT)/g' \
-             -e 's/@''GNULIB_FEGETENV''@/$(GNULIB_FEGETENV)/g' \
-             -e 's/@''GNULIB_FEGETEXCEPT''@/$(GNULIB_FEGETEXCEPT)/g' \
-             -e 's/@''GNULIB_FEGETEXCEPTFLAG''@/$(GNULIB_FEGETEXCEPTFLAG)/g' \
-             -e 's/@''GNULIB_FEGETROUND''@/$(GNULIB_FEGETROUND)/g' \
-             -e 's/@''GNULIB_FEHOLDEXCEPT''@/$(GNULIB_FEHOLDEXCEPT)/g' \
-             -e 's/@''GNULIB_FERAISEEXCEPT''@/$(GNULIB_FERAISEEXCEPT)/g' \
-             -e 's/@''GNULIB_FESETENV''@/$(GNULIB_FESETENV)/g' \
-             -e 's/@''GNULIB_FESETEXCEPT''@/$(GNULIB_FESETEXCEPT)/g' \
-             -e 's/@''GNULIB_FESETEXCEPTFLAG''@/$(GNULIB_FESETEXCEPTFLAG)/g' \
-             -e 's/@''GNULIB_FESETROUND''@/$(GNULIB_FESETROUND)/g' \
-             -e 's/@''GNULIB_FETESTEXCEPT''@/$(GNULIB_FETESTEXCEPT)/g' \
-             -e 's/@''GNULIB_FETESTEXCEPTFLAG''@/$(GNULIB_FETESTEXCEPTFLAG)/g' \
-             -e 's/@''GNULIB_FEUPDATEENV''@/$(GNULIB_FEUPDATEENV)/g' \
-             -e 's|@''HAVE_FECLEAREXCEPT''@|$(HAVE_FECLEAREXCEPT)|g' \
-             -e 's|@''HAVE_FEDISABLEEXCEPT''@|$(HAVE_FEDISABLEEXCEPT)|g' \
-             -e 's|@''HAVE_FEENABLEEXCEPT''@|$(HAVE_FEENABLEEXCEPT)|g' \
-             -e 's|@''HAVE_FEGETENV''@|$(HAVE_FEGETENV)|g' \
-             -e 's|@''HAVE_FEGETEXCEPT''@|$(HAVE_FEGETEXCEPT)|g' \
-             -e 's|@''HAVE_FEGETEXCEPTFLAG''@|$(HAVE_FEGETEXCEPTFLAG)|g' \
-             -e 's|@''HAVE_FEGETROUND''@|$(HAVE_FEGETROUND)|g' \
-             -e 's|@''HAVE_FEHOLDEXCEPT''@|$(HAVE_FEHOLDEXCEPT)|g' \
-             -e 's|@''HAVE_FERAISEEXCEPT''@|$(HAVE_FERAISEEXCEPT)|g' \
-             -e 's|@''HAVE_FESETENV''@|$(HAVE_FESETENV)|g' \
-             -e 's|@''HAVE_FESETEXCEPT''@|$(HAVE_FESETEXCEPT)|g' \
-             -e 's|@''HAVE_FESETEXCEPTFLAG''@|$(HAVE_FESETEXCEPTFLAG)|g' \
-             -e 's|@''HAVE_FESETROUND''@|$(HAVE_FESETROUND)|g' \
-             -e 's|@''HAVE_FETESTEXCEPT''@|$(HAVE_FETESTEXCEPT)|g' \
-             -e 's|@''HAVE_FETESTEXCEPTFLAG''@|$(HAVE_FETESTEXCEPTFLAG)|g' \
-             -e 's|@''HAVE_FEUPDATEENV''@|$(HAVE_FEUPDATEENV)|g' \
-             -e 's|@''REPLACE_FECLEAREXCEPT''@|$(REPLACE_FECLEAREXCEPT)|g' \
-             -e 's|@''REPLACE_FEDISABLEEXCEPT''@|$(REPLACE_FEDISABLEEXCEPT)|g' \
-             -e 's|@''REPLACE_FEENABLEEXCEPT''@|$(REPLACE_FEENABLEEXCEPT)|g' \
-             -e 's|@''REPLACE_FEGETENV''@|$(REPLACE_FEGETENV)|g' \
-             -e 's|@''REPLACE_FEGETEXCEPT''@|$(REPLACE_FEGETEXCEPT)|g' \
-             -e 's|@''REPLACE_FEGETEXCEPTFLAG''@|$(REPLACE_FEGETEXCEPTFLAG)|g' \
-             -e 's|@''REPLACE_FEGETROUND''@|$(REPLACE_FEGETROUND)|g' \
-             -e 's|@''REPLACE_FEHOLDEXCEPT''@|$(REPLACE_FEHOLDEXCEPT)|g' \
-             -e 's|@''REPLACE_FERAISEEXCEPT''@|$(REPLACE_FERAISEEXCEPT)|g' \
-             -e 's|@''REPLACE_FESETENV''@|$(REPLACE_FESETENV)|g' \
-             -e 's|@''REPLACE_FESETEXCEPT''@|$(REPLACE_FESETEXCEPT)|g' \
-             -e 's|@''REPLACE_FESETEXCEPTFLAG''@|$(REPLACE_FESETEXCEPTFLAG)|g' \
-             -e 's|@''REPLACE_FESETROUND''@|$(REPLACE_FESETROUND)|g' \
-             -e 's|@''REPLACE_FETESTEXCEPT''@|$(REPLACE_FETESTEXCEPT)|g' \
-             -e 's|@''REPLACE_FEUPDATEENV''@|$(REPLACE_FEUPDATEENV)|g' \
-             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             $(srcdir)/fenv.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += fenv.h fenv.h-t
 
 Include:
 <fenv.h>
@@ -90,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-all
diff --git a/modules/fenv-c++-tests b/modules/fenv-c++-tests
deleted file mode 100644 (file)
index a485726..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Files:
-tests/test-fenv-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-fenv-c++
-check_PROGRAMS += test-fenv-c++
-test_fenv_c___SOURCES = test-fenv-c++.cc
-test_fenv_c___LDADD = $(LDADD) $(FENV_ENVIRONMENT_LIBM) $(FENV_ROUNDING_LIBM) $(FENV_EXCEPTIONS_TRACKING_LIBM) $(FENV_EXCEPTIONS_TRAPPING_LIBM)
-endif
index ab5e15bcab1e423750775c68a0a2505f906a35a5..addf45cb6dbfd75a758ff575a3e6657bfc82db49 100644 (file)
@@ -12,7 +12,7 @@ m4/mathfunc.m4
 m4/musl.m4
 
 Depends-on:
-fenv
+fenv-h
 extensions
 verify
 fenv-exceptions-tracking-c99
index 487913c076a3670a31024c78d8943e66024c1f3f..cd9bc89f899cb6af6377f8a435fd4158c9a29bcd 100644 (file)
@@ -8,7 +8,7 @@ m4/fenv-exceptions-state-c23.m4
 m4/mathfunc.m4
 
 Depends-on:
-fenv
+fenv-h
 fenv-exceptions-state-c99
 
 configure.ac:
index dcf7c42c1010ed0c0bd6107c61bf3e9fb41a3d4b..563c93180ecf72b53f35198ada8b2abf53701f45 100644 (file)
@@ -11,7 +11,7 @@ m4/fenv-exceptions.m4
 m4/mathfunc.m4
 
 Depends-on:
-fenv
+fenv-h
 
 configure.ac:
 gl_FENV_EXCEPTIONS_STATE
index a10145a24ee1568bea44d6ddddec8acc1bd8e9e8..90f681c359c729b93cd2527eee64acf287d25711 100644 (file)
@@ -9,7 +9,7 @@ m4/fenv-exceptions-tracking-c23.m4
 m4/mathfunc.m4
 
 Depends-on:
-fenv
+fenv-h
 fenv-exceptions-tracking-c99
 
 configure.ac:
index 2e800cc47ba313e24534d27943466c96f3dc6faa..bbf32664bc70cca7385dd3a33adc7735b1faf448 100644 (file)
@@ -12,7 +12,7 @@ m4/fenv-exceptions.m4
 m4/mathfunc.m4
 
 Depends-on:
-fenv
+fenv-h
 
 configure.ac:
 gl_FENV_EXCEPTIONS_TRACKING
index 7ce55fcbd6505186a256a70f097fd4b78360d420..1ba8339d6e9dea32b85e58ff74f99f1fc74e8e4f 100644 (file)
@@ -10,7 +10,7 @@ m4/mathfunc.m4
 m4/musl.m4
 
 Depends-on:
-fenv
+fenv-h
 extensions
 
 configure.ac:
diff --git a/modules/fenv-h b/modules/fenv-h
new file mode 100644 (file)
index 0000000..6c02818
--- /dev/null
@@ -0,0 +1,93 @@
+Description:
+A GNU-like <fenv.h>.
+It nearly conforms to C99 and to C23.
+
+Files:
+lib/fenv.in.h
+m4/fenv_h.m4
+
+Depends-on:
+gen-header
+include_next
+snippet/c++defs
+snippet/warn-on-use
+
+configure.ac:
+gl_FENV_H
+gl_FENV_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += fenv.h
+
+# We need the following in order to create an override of <fenv.h>.
+fenv.h: fenv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+@NMD@  $(AM_V_GEN)$(MKDIR_P) '%reldir%'
+       $(gl_V_at)$(SED_HEADER_STDOUT) \
+             -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+             -e 's/@''HAVE_FENV_H''@/$(HAVE_FENV_H)/g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_FENV_H''@|$(NEXT_FENV_H)|g' \
+             -e 's/@''GNULIB_FECLEAREXCEPT''@/$(GNULIB_FECLEAREXCEPT)/g' \
+             -e 's/@''GNULIB_FEDISABLEEXCEPT''@/$(GNULIB_FEDISABLEEXCEPT)/g' \
+             -e 's/@''GNULIB_FEENABLEEXCEPT''@/$(GNULIB_FEENABLEEXCEPT)/g' \
+             -e 's/@''GNULIB_FEGETENV''@/$(GNULIB_FEGETENV)/g' \
+             -e 's/@''GNULIB_FEGETEXCEPT''@/$(GNULIB_FEGETEXCEPT)/g' \
+             -e 's/@''GNULIB_FEGETEXCEPTFLAG''@/$(GNULIB_FEGETEXCEPTFLAG)/g' \
+             -e 's/@''GNULIB_FEGETROUND''@/$(GNULIB_FEGETROUND)/g' \
+             -e 's/@''GNULIB_FEHOLDEXCEPT''@/$(GNULIB_FEHOLDEXCEPT)/g' \
+             -e 's/@''GNULIB_FERAISEEXCEPT''@/$(GNULIB_FERAISEEXCEPT)/g' \
+             -e 's/@''GNULIB_FESETENV''@/$(GNULIB_FESETENV)/g' \
+             -e 's/@''GNULIB_FESETEXCEPT''@/$(GNULIB_FESETEXCEPT)/g' \
+             -e 's/@''GNULIB_FESETEXCEPTFLAG''@/$(GNULIB_FESETEXCEPTFLAG)/g' \
+             -e 's/@''GNULIB_FESETROUND''@/$(GNULIB_FESETROUND)/g' \
+             -e 's/@''GNULIB_FETESTEXCEPT''@/$(GNULIB_FETESTEXCEPT)/g' \
+             -e 's/@''GNULIB_FETESTEXCEPTFLAG''@/$(GNULIB_FETESTEXCEPTFLAG)/g' \
+             -e 's/@''GNULIB_FEUPDATEENV''@/$(GNULIB_FEUPDATEENV)/g' \
+             -e 's|@''HAVE_FECLEAREXCEPT''@|$(HAVE_FECLEAREXCEPT)|g' \
+             -e 's|@''HAVE_FEDISABLEEXCEPT''@|$(HAVE_FEDISABLEEXCEPT)|g' \
+             -e 's|@''HAVE_FEENABLEEXCEPT''@|$(HAVE_FEENABLEEXCEPT)|g' \
+             -e 's|@''HAVE_FEGETENV''@|$(HAVE_FEGETENV)|g' \
+             -e 's|@''HAVE_FEGETEXCEPT''@|$(HAVE_FEGETEXCEPT)|g' \
+             -e 's|@''HAVE_FEGETEXCEPTFLAG''@|$(HAVE_FEGETEXCEPTFLAG)|g' \
+             -e 's|@''HAVE_FEGETROUND''@|$(HAVE_FEGETROUND)|g' \
+             -e 's|@''HAVE_FEHOLDEXCEPT''@|$(HAVE_FEHOLDEXCEPT)|g' \
+             -e 's|@''HAVE_FERAISEEXCEPT''@|$(HAVE_FERAISEEXCEPT)|g' \
+             -e 's|@''HAVE_FESETENV''@|$(HAVE_FESETENV)|g' \
+             -e 's|@''HAVE_FESETEXCEPT''@|$(HAVE_FESETEXCEPT)|g' \
+             -e 's|@''HAVE_FESETEXCEPTFLAG''@|$(HAVE_FESETEXCEPTFLAG)|g' \
+             -e 's|@''HAVE_FESETROUND''@|$(HAVE_FESETROUND)|g' \
+             -e 's|@''HAVE_FETESTEXCEPT''@|$(HAVE_FETESTEXCEPT)|g' \
+             -e 's|@''HAVE_FETESTEXCEPTFLAG''@|$(HAVE_FETESTEXCEPTFLAG)|g' \
+             -e 's|@''HAVE_FEUPDATEENV''@|$(HAVE_FEUPDATEENV)|g' \
+             -e 's|@''REPLACE_FECLEAREXCEPT''@|$(REPLACE_FECLEAREXCEPT)|g' \
+             -e 's|@''REPLACE_FEDISABLEEXCEPT''@|$(REPLACE_FEDISABLEEXCEPT)|g' \
+             -e 's|@''REPLACE_FEENABLEEXCEPT''@|$(REPLACE_FEENABLEEXCEPT)|g' \
+             -e 's|@''REPLACE_FEGETENV''@|$(REPLACE_FEGETENV)|g' \
+             -e 's|@''REPLACE_FEGETEXCEPT''@|$(REPLACE_FEGETEXCEPT)|g' \
+             -e 's|@''REPLACE_FEGETEXCEPTFLAG''@|$(REPLACE_FEGETEXCEPTFLAG)|g' \
+             -e 's|@''REPLACE_FEGETROUND''@|$(REPLACE_FEGETROUND)|g' \
+             -e 's|@''REPLACE_FEHOLDEXCEPT''@|$(REPLACE_FEHOLDEXCEPT)|g' \
+             -e 's|@''REPLACE_FERAISEEXCEPT''@|$(REPLACE_FERAISEEXCEPT)|g' \
+             -e 's|@''REPLACE_FESETENV''@|$(REPLACE_FESETENV)|g' \
+             -e 's|@''REPLACE_FESETEXCEPT''@|$(REPLACE_FESETEXCEPT)|g' \
+             -e 's|@''REPLACE_FESETEXCEPTFLAG''@|$(REPLACE_FESETEXCEPTFLAG)|g' \
+             -e 's|@''REPLACE_FESETROUND''@|$(REPLACE_FESETROUND)|g' \
+             -e 's|@''REPLACE_FETESTEXCEPT''@|$(REPLACE_FETESTEXCEPT)|g' \
+             -e 's|@''REPLACE_FEUPDATEENV''@|$(REPLACE_FEUPDATEENV)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             $(srcdir)/fenv.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += fenv.h fenv.h-t
+
+Include:
+<fenv.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/fenv-h-c++-tests b/modules/fenv-h-c++-tests
new file mode 100644 (file)
index 0000000..da099c2
--- /dev/null
@@ -0,0 +1,19 @@
+Files:
+tests/test-fenv-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-fenv-h-c++
+check_PROGRAMS += test-fenv-h-c++
+test_fenv_h_c___SOURCES = test-fenv-h-c++.cc
+test_fenv_h_c___LDADD = $(LDADD) $(FENV_ENVIRONMENT_LIBM) $(FENV_ROUNDING_LIBM) $(FENV_EXCEPTIONS_TRACKING_LIBM) $(FENV_EXCEPTIONS_TRAPPING_LIBM)
+endif
diff --git a/modules/fenv-h-tests b/modules/fenv-h-tests
new file mode 100644 (file)
index 0000000..e8909ad
--- /dev/null
@@ -0,0 +1,12 @@
+Files:
+tests/test-fenv-h.c
+
+Depends-on:
+verify
+fenv-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fenv-h
+check_PROGRAMS += test-fenv-h
index bd7eb488240eb024bce8de010eaa8fa626f8319e..3a9524e53374c6dba45a05a180d8234729d686f8 100644 (file)
@@ -9,7 +9,7 @@ m4/fenv-rounding.m4
 m4/mathfunc.m4
 
 Depends-on:
-fenv
+fenv-h
 
 configure.ac:
 gl_FENV_ROUNDING
diff --git a/modules/fenv-tests b/modules/fenv-tests
deleted file mode 100644 (file)
index c7f96c0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Files:
-tests/test-fenv.c
-
-Depends-on:
-verify
-fenv-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-fenv
-check_PROGRAMS += test-fenv
diff --git a/tests/test-fenv-c++.cc b/tests/test-fenv-c++.cc
deleted file mode 100644 (file)
index db5d192..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Test of <fenv.h> substitute in C++ mode.
-   Copyright (C) 2023-2024 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <fenv.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_FEGETENV
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetenv, int, (fenv_t *));
-#endif
-
-#if GNULIB_TEST_FESETENV
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetenv, int, (fenv_t const *));
-#endif
-
-#if GNULIB_TEST_FEUPDATEENV
-SIGNATURE_CHECK (GNULIB_NAMESPACE::feupdateenv, int, (fenv_t const *));
-#endif
-
-#if GNULIB_TEST_FEHOLDEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::feholdexcept, int, (fenv_t *));
-#endif
-
-#if GNULIB_TEST_FEGETROUND
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetround, int, (void));
-#endif
-
-#if GNULIB_TEST_FESETROUND
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetround, int, (int));
-#endif
-
-#if GNULIB_TEST_FECLEAREXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::feclearexcept, int, (int));
-#endif
-
-#if GNULIB_TEST_FERAISEEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::feraiseexcept, int, (int));
-#endif
-
-#if GNULIB_TEST_FETESTEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fetestexcept, int, (int));
-#endif
-
-#if GNULIB_TEST_FESETEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetexcept, int, (int));
-#endif
-
-#if GNULIB_TEST_FEENABLEEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::feenableexcept, int, (int));
-#endif
-
-#if GNULIB_TEST_FEDISABLEEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fedisableexcept, int, (int));
-#endif
-
-#if GNULIB_TEST_FEGETEXCEPT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetexcept, int, (void));
-#endif
-
-#if GNULIB_TEST_FEGETEXCEPTFLAG
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetexceptflag, int, (fexcept_t *, int));
-#endif
-
-#if GNULIB_TEST_FESETEXCEPTFLAG
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetexceptflag, int, (fexcept_t const *, int));
-#endif
-
-#if GNULIB_TEST_FETESTEXCEPTFLAG
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fetestexceptflag, int, (fexcept_t const *, int));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-fenv-h-c++.cc b/tests/test-fenv-h-c++.cc
new file mode 100644 (file)
index 0000000..db5d192
--- /dev/null
@@ -0,0 +1,95 @@
+/* Test of <fenv.h> substitute in C++ mode.
+   Copyright (C) 2023-2024 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <fenv.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_FEGETENV
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetenv, int, (fenv_t *));
+#endif
+
+#if GNULIB_TEST_FESETENV
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetenv, int, (fenv_t const *));
+#endif
+
+#if GNULIB_TEST_FEUPDATEENV
+SIGNATURE_CHECK (GNULIB_NAMESPACE::feupdateenv, int, (fenv_t const *));
+#endif
+
+#if GNULIB_TEST_FEHOLDEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::feholdexcept, int, (fenv_t *));
+#endif
+
+#if GNULIB_TEST_FEGETROUND
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetround, int, (void));
+#endif
+
+#if GNULIB_TEST_FESETROUND
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetround, int, (int));
+#endif
+
+#if GNULIB_TEST_FECLEAREXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::feclearexcept, int, (int));
+#endif
+
+#if GNULIB_TEST_FERAISEEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::feraiseexcept, int, (int));
+#endif
+
+#if GNULIB_TEST_FETESTEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fetestexcept, int, (int));
+#endif
+
+#if GNULIB_TEST_FESETEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetexcept, int, (int));
+#endif
+
+#if GNULIB_TEST_FEENABLEEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::feenableexcept, int, (int));
+#endif
+
+#if GNULIB_TEST_FEDISABLEEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fedisableexcept, int, (int));
+#endif
+
+#if GNULIB_TEST_FEGETEXCEPT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetexcept, int, (void));
+#endif
+
+#if GNULIB_TEST_FEGETEXCEPTFLAG
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fegetexceptflag, int, (fexcept_t *, int));
+#endif
+
+#if GNULIB_TEST_FESETEXCEPTFLAG
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fesetexceptflag, int, (fexcept_t const *, int));
+#endif
+
+#if GNULIB_TEST_FETESTEXCEPTFLAG
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fetestexceptflag, int, (fexcept_t const *, int));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-fenv-h.c b/tests/test-fenv-h.c
new file mode 100644 (file)
index 0000000..1698299
--- /dev/null
@@ -0,0 +1,69 @@
+/* Test of <fenv.h> substitute.
+   Copyright (C) 2023-2024 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <fenv.h>
+
+#include "verify.h"
+
+/* Check that the various FE_* macros are defined.  */
+int r[] =
+  {
+#ifdef FE_DOWNWARD
+    FE_DOWNWARD,
+#endif
+#ifdef FE_UPWARD
+    FE_UPWARD,
+#endif
+#ifdef FE_TOWARDZERO
+    FE_TOWARDZERO,
+#endif
+    FE_TONEAREST
+  };
+int e[] = { FE_DIVBYZERO, FE_INEXACT, FE_INVALID, FE_OVERFLOW, FE_UNDERFLOW };
+
+/* Check that the types are all defined.  */
+fenv_t t1;
+fexcept_t t2;
+
+/* On many platforms, other FE_* constants are included in FE_ALL_EXCEPT,
+   therefore in general
+     FE_ALL_EXCEPT == (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
+   does not hold.  */
+verify (((FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
+         & ~FE_ALL_EXCEPT)
+        == 0);
+
+int
+main (void)
+{
+  /* Ensure no overlap in FE_*. */
+  switch (FE_INVALID)
+    {
+    case FE_DIVBYZERO:
+    case FE_INEXACT:
+    case FE_INVALID:
+    case FE_OVERFLOW:
+    case FE_UNDERFLOW:
+      ;
+    }
+
+  return 0;
+}
diff --git a/tests/test-fenv.c b/tests/test-fenv.c
deleted file mode 100644 (file)
index 1698299..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Test of <fenv.h> substitute.
-   Copyright (C) 2023-2024 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2023.  */
-
-#include <config.h>
-
-/* Specification.  */
-#include <fenv.h>
-
-#include "verify.h"
-
-/* Check that the various FE_* macros are defined.  */
-int r[] =
-  {
-#ifdef FE_DOWNWARD
-    FE_DOWNWARD,
-#endif
-#ifdef FE_UPWARD
-    FE_UPWARD,
-#endif
-#ifdef FE_TOWARDZERO
-    FE_TOWARDZERO,
-#endif
-    FE_TONEAREST
-  };
-int e[] = { FE_DIVBYZERO, FE_INEXACT, FE_INVALID, FE_OVERFLOW, FE_UNDERFLOW };
-
-/* Check that the types are all defined.  */
-fenv_t t1;
-fexcept_t t2;
-
-/* On many platforms, other FE_* constants are included in FE_ALL_EXCEPT,
-   therefore in general
-     FE_ALL_EXCEPT == (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
-   does not hold.  */
-verify (((FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
-         & ~FE_ALL_EXCEPT)
-        == 0);
-
-int
-main (void)
-{
-  /* Ensure no overlap in FE_*. */
-  switch (FE_INVALID)
-    {
-    case FE_DIVBYZERO:
-    case FE_INEXACT:
-    case FE_INVALID:
-    case FE_OVERFLOW:
-    case FE_UNDERFLOW:
-      ;
-    }
-
-  return 0;
-}