From a298f0a066d81f3270ca53cdff6d1efa13f18f03 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Nov 2023 16:37:02 +0100 Subject: [PATCH] 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 . --- ChangeLog | 7 +++++++ lib/fenv.in.h | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 423b490331..66e5ce0da9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-11-04 Bruno Haible + + 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 + . + 2023-11-04 Bruno Haible doc: Update info about Cygwin feraiseexcept bug. 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 -- 2.39.5