[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'fenv-exceptions-state-c99'
From: |
Bruno Haible |
Subject: |
Re: new module 'fenv-exceptions-state-c99' |
Date: |
Sat, 04 Nov 2023 16:40:53 +0100 |
This patch fixes a compilation error on FreeBSD, when I use
gl_cv_func_fesetexceptflag_in_libm=no \
gl_cv_func_fesetexceptflag_no_libm=no \
./configure
for testing the override code.
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>.
diff --git a/lib/fenv.in.h b/lib/fenv.in.h
index 4fd5ea2f1a..b1c52d6e27 100644
--- a/lib/fenv.in.h
+++ b/lib/fenv.in.h
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: new module 'fenv-exceptions-state-c99',
Bruno Haible <=