From 79f54bfcb93f5b1be2e1dfecbead3b06c53434de Mon Sep 17 00:00:00 2001 From: "Le.Sigwal" <61907278+le-sigwal@users.noreply.github.com> Date: Tue, 15 Jul 2025 00:06:44 +0200 Subject: [PATCH] Compilation issue over gwin64-7.3.0 (mingw32 host) https://al.liammig.bzh/crlibm/ftq/#CRM_VR_000001 Added test over CRLIBM_HAS_FPU_CONTROL in crlibm_exit() as in crlibm_init(). --- crlibm_private.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crlibm_private.c b/crlibm_private.c index 61e1f60..06f9b4a 100644 --- a/crlibm_private.c +++ b/crlibm_private.c @@ -101,12 +101,12 @@ unsigned long long crlibm_init() { /* An exit function which sets FPU flags to initial value */ void crlibm_exit(unsigned long long int oldcw) { #ifndef CRLIBM_TYPEOS_BSD -#if (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)) +# if defined(CRLIBM_HAS_FPU_CONTROL) && (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)) /* Set FPU flags to use double, not double extended, with rounding to nearest */ unsigned short t = (unsigned short)oldcw; _FPU_SETCW(t); -#endif +# endif #endif }