]> Savannah Git Hosting - gnulib.git/commitdiff
fenv-exceptions-state-c99: Fix compilation error on FreeBSD.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Nov 2023 15:37:02 +0000 (16:37 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Nov 2023 15:39:35 +0000 (16:39 +0100)
* lib/fenv.in.h (fegetexceptflag, fesetexceptflag): On FreeBSD, use an
rpl_ prefix, to avoid a conflict with an inline definition in FreeBSD's
<fenv.h>.

ChangeLog
lib/fenv.in.h

index 423b49033138a9f3a43b4ffe37d58bb033f6ccb7..66e5ce0da9db47e6c1497e54390b67631bd7d828 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-11-04  Bruno Haible  <bruno@clisp.org>
+
+       fenv-exceptions-state-c99: Fix compilation error on FreeBSD.
+       * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): On FreeBSD, use an
+       rpl_ prefix, to avoid a conflict with an inline definition in FreeBSD's
+       <fenv.h>.
+
 2023-11-04  Bruno Haible  <bruno@clisp.org>
 
        doc: Update info about Cygwin feraiseexcept bug.
index 4fd5ea2f1a03e34d4dc27f61d6957d090e0dff8f..b1c52d6e278ca66a7175dc8db9f5a1729cd8ff94 100644 (file)
@@ -708,7 +708,7 @@ typedef unsigned long fexcept_t;
 #if @GNULIB_FEGETEXCEPTFLAG@
 /* Stores the current floating-point exception status flags denoted
    by EXCEPTIONS in *SAVED_FLAGS.  */
-# if @REPLACE_FEGETEXCEPTFLAG@
+# if @REPLACE_FEGETEXCEPTFLAG@ || (!@HAVE_FEGETEXCEPTFLAG@ && defined __FreeBSD__) /* has an inline definition */
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef fegetexceptflag
 #   define fegetexceptflag rpl_fegetexceptflag
@@ -731,7 +731,7 @@ _GL_CXXALIASWARN (fegetexceptflag);
 #if @GNULIB_FESETEXCEPTFLAG@
 /* Copies the flags denoted by EXCEPTIONS from *SAVED_FLAGS to the
    floating-point exception status flags.  */
-# if @REPLACE_FESETEXCEPTFLAG@
+# if @REPLACE_FESETEXCEPTFLAG@ || (!@HAVE_FESETEXCEPTFLAG@ && defined __FreeBSD__) /* has an inline definition */
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef fesetexceptflag
 #   define fesetexceptflag rpl_fesetexceptflag