On 5/15/21 12:58 PM, JonY wrote:
Hi,
Attached patch OK?
Simplified patch.
>From ff422cf04d8f9e105c68ac2ffdd25da4add8f8fb Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10wa...@gmail.com>
Date: Sat, 15 May 2021 12:56:51 +0000
Subject: [PATCH] crt: _HUGE for UCRT
Signed-off-by: Jonathan Yong <10wa...@gmail.com>
---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/math/_huge.c | 4 ++++
2 files changed, 5 insertions(+)
create mode 100644 mingw-w64-crt/math/_huge.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 1f48b72e..47db28bf 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -229,6 +229,7 @@ src_msvcrt=\
src_ucrtbase=\
crt/ucrtbase_compat.c \
+ math/_huge.c \
stdio/ucrt_fprintf.c \
stdio/ucrt_fscanf.c \
stdio/ucrt_fwprintf.c \
diff --git a/mingw-w64-crt/math/_huge.c b/mingw-w64-crt/math/_huge.c
new file mode 100644
index 00000000..f1dd74c6
--- /dev/null
+++ b/mingw-w64-crt/math/_huge.c
@@ -0,0 +1,4 @@
+/* alias for UCRT, positive infinity */
+#include <_mingw.h>
+double _HUGE = __builtin_huge_val();
+double *__MINGW_IMP_SYMBOL(_HUGE) = &_HUGE;
--
2.31.1
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public