summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch')
-rw-r--r--modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch b/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
new file mode 100644
index 0000000000..9f834149c6
--- /dev/null
+++ b/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
@@ -0,0 +1,22 @@
+diff --git a/math_private.h b/math_private.h
+--- a/math_private.h
++++ b/math_private.h
+@@ -309,17 +309,17 @@ do { \
+ /* The above works on non-i386 too, but we use this to check v. */
+ #define LD80C(m, ex, v) { .e = (v), }
+ #endif
+
+ #ifdef FLT_EVAL_METHOD
+ /*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+-#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
++#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+ #define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
+ #else
+ #define STRICT_ASSIGN(type, lval, rval) do { \
+ volatile type __lval; \
+ \
+ if (sizeof(type) >= sizeof(long double)) \
+ (lval) = (rval); \
+ else { \