summaryrefslogtreecommitdiff
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
commitca1b9694de00da54b6e19dbc8a3a0ff686a39dc5 (patch)
tree1e9a35f41c3af25d2f8ff8bb8f159c6dc7a13186 /modules/fdlibm
parentbf217c35b253e243523cadaf56838510b7c331af (diff)
downloaduxp-ca1b9694de00da54b6e19dbc8a3a0ff686a39dc5.tar.gz
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 b8f238c743..c0e9814aa3 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 6947cecc09..86597e75f7 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