diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-15 17:37:54 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-15 17:37:54 -0500 |
commit | 556349010e01d0a3b7896f858d503781ea837b46 (patch) | |
tree | f003183732dc3cda4ad880407880da282ca4b0c5 /modules/fdlibm/patches/16_use_safer_strict_assign_on_visual_studio.patch | |
parent | f3d462c6049bd2f35571c2a0e2a7c4df4f3ca81c (diff) | |
parent | 3492ad65236209e741ca3641789efeaa22a6b8a4 (diff) | |
download | UXP-556349010e01d0a3b7896f858d503781ea837b46.tar UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.gz UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.lz UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.xz UXP-556349010e01d0a3b7896f858d503781ea837b46.zip |
Merge branch 'master' into mailnews-work
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.patch | 22 |
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 { \ |