summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2019-10-02 17:38:39 -0500
committerathenian200 <athenian200@outlook.com>2019-10-21 04:53:42 -0500
commit4f6639a1b35d4941f52eb4c8901adf45b35bc10d (patch)
tree1e9a35f41c3af25d2f8ff8bb8f159c6dc7a13186 /modules/fdlibm
parente3fb8bd24dcbc8357c325e3b24d0ad410bf0b15d (diff)
downloadUXP-4f6639a1b35d4941f52eb4c8901adf45b35bc10d.tar
UXP-4f6639a1b35d4941f52eb4c8901adf45b35bc10d.tar.gz
UXP-4f6639a1b35d4941f52eb4c8901adf45b35bc10d.tar.lz
UXP-4f6639a1b35d4941f52eb4c8901adf45b35bc10d.tar.xz
UXP-4f6639a1b35d4941f52eb4c8901adf45b35bc10d.zip
MoonchildProductions#1251 - Part 15: fdlibm should provide definition for u_int32_t and u_int64_t.
https://bugzilla.mozilla.org/show_bug.cgi?id=1350355 u_int32_t is not an stdint.h type. Windows already requires this, Solaris needs it too. If someone has a nit with this approach, the alternatives include: 1. Just replacing every instance of u_int32_t with uint32_t. 2. Including <sys/types.h> for Solaris only, which does define this. 3. Changing the original ifdef to be WIN32 || XP_SOLARIS But it really doesn't matter how you solve this problem, all of the approaches are functionally equivalent, and this one has been used in Firefox since version 55. As far as I can tell, all it does is apply a fix that was being done for Windows already to any platform that needs it.
Diffstat (limited to 'modules/fdlibm')
-rw-r--r--modules/fdlibm/patches/12_define_u_int32_t_and_u_int64_t_on_windows.patch4
-rw-r--r--modules/fdlibm/src/math_private.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/fdlibm/patches/12_define_u_int32_t_and_u_int64_t_on_windows.patch b/modules/fdlibm/patches/12_define_u_int32_t_and_u_int64_t_on_windows.patch
index b8f238c74..c0e9814aa 100644
--- a/modules/fdlibm/patches/12_define_u_int32_t_and_u_int64_t_on_windows.patch
+++ b/modules/fdlibm/patches/12_define_u_int32_t_and_u_int64_t_on_windows.patch
@@ -10,8 +10,10 @@ diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private
* endianness at run time.
*/
-+#ifdef WIN32
++#ifndef u_int32_t
+#define u_int32_t uint32_t
++#endif
++#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
index 6947cecc0..86597e75f 100644
--- a/modules/fdlibm/src/math_private.h
+++ b/modules/fdlibm/src/math_private.h
@@ -38,8 +38,10 @@
* endianness at run time.
*/
-#ifdef WIN32
+#ifndef u_int32_t
#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
#define u_int64_t uint64_t
#endif