summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch')
-rw-r--r--modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch b/modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch
new file mode 100644
index 0000000000..d22073391e
--- /dev/null
+++ b/modules/fdlibm/patches/20_emulate_freebsd_internal_double_types.patch
@@ -0,0 +1,28 @@
+diff --git a/math_private.h b/math_private.h
+--- a/math_private.h
++++ b/math_private.h
+@@ -20,16 +20,24 @@
+ #include <cfloat>
+ #include <stdint.h>
+ #include <sys/types.h>
+
+ #include "mozilla/EndianUtils.h"
+
+ #include "fdlibm.h"
+
++/*
++ * Emulate FreeBSD internal double types.
++ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
++ */
++
++typedef double __double_t;
++typedef __double_t double_t;
++
+ /*
+ * The original fdlibm code used statements like:
+ * n0 = ((*(int*)&one)>>29)^1; * index of high word *
+ * ix0 = *(n0+(int*)&x); * high word of x *
+ * ix1 = *((1-n0)+(int*)&x); * low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value. That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong. We instead use the following macros.