summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-15 15:17:37 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-15 15:17:37 +0100
commit59f4de4c45e126f5f20633808ce28548d5879b16 (patch)
tree2db061bafcebcac423ca7deeb152435c44944419 /modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
parent5e902a4a9a25a9e151b5d3945c68517bc0c73139 (diff)
downloadUXP-59f4de4c45e126f5f20633808ce28548d5879b16.tar
UXP-59f4de4c45e126f5f20633808ce28548d5879b16.tar.gz
UXP-59f4de4c45e126f5f20633808ce28548d5879b16.tar.lz
UXP-59f4de4c45e126f5f20633808ce28548d5879b16.tar.xz
UXP-59f4de4c45e126f5f20633808ce28548d5879b16.zip
Issue #1291 - Part 4: Update patch files
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 000000000..855f91a0d
--- /dev/null
+++ b/modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch
@@ -0,0 +1,22 @@
+diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
+--- a/modules/fdlibm/src/math_private.h
++++ b/modules/fdlibm/src/math_private.h
+@@ -314,17 +314,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 { \