[PATCH 7/9] mips: Add __BEGIN_DECLS/__END_DECLS to fpu_control.h
Carlos O'Donell
carlos@redhat.com
Mon Nov 2 17:00:29 GMT 2026
On 10/21/26 9:54 AM, Adhemerval Zanella wrote:
> The MIPS16 _FPU_GETCW and _FPU_SETCW macros call __mips_fpu_getcw and
> __mips_fpu_setcw, whose prototypes have C++ language linkage when
> <fpu_control.h> is included from C++.
>
> Checked with the math installed-header tests on mipsel-linux-gnu,
> mips64el-linux-gnu, and mips64el-n32-linux-gnu.
LGTM.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> sysdeps/mips/fpu_control.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
> index 618eec298af..7b0b811add3 100644
> --- a/sysdeps/mips/fpu_control.h
> +++ b/sysdeps/mips/fpu_control.h
> @@ -113,6 +113,8 @@ extern fpu_control_t __fpu_control;
> /* Type of the control word. */
> typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
>
> +__BEGIN_DECLS
> +
> /* Macros for accessing the hardware control word. */
> extern fpu_control_t __mips_fpu_getcw (void) __THROW;
> extern void __mips_fpu_setcw (fpu_control_t) __THROW;
> @@ -127,6 +129,8 @@ extern void __mips_fpu_setcw (fpu_control_t) __THROW;
> /* Default control word set at startup. */
> extern fpu_control_t __fpu_control;
>
> +__END_DECLS
> +
> #endif /* __mips_soft_float */
>
> #endif /* fpu_control.h */
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list