summaryrefslogtreecommitdiff
path: root/Zend/zend_strtod_int.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-18 00:38:19 +0100
committerAnatol Belski <ab@php.net>2015-03-18 00:39:06 +0100
commit956bab0566b4b0736fa86209f3c240b6688d9cfc (patch)
tree413f7d2b1b6c67010415e8c69b8358bc581a4e97 /Zend/zend_strtod_int.h
parent780222f97f47644a6a118ada86a269a96a1e8134 (diff)
downloadphp-git-956bab0566b4b0736fa86209f3c240b6688d9cfc.tar.gz
fix endianness check plus better visual origin compat
Diffstat (limited to 'Zend/zend_strtod_int.h')
-rw-r--r--Zend/zend_strtod_int.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h
index ba954cb818..75936af27b 100644
--- a/Zend/zend_strtod_int.h
+++ b/Zend/zend_strtod_int.h
@@ -1,4 +1,18 @@
+#ifdef ZTS
+#include <TSRM.h>
+#endif
+
+#include <stddef.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdarg.h>
+#include <math.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
/* TODO check to undef this option, this might
make more perf. destroy_freelist()
should be adapted then. */
@@ -36,14 +50,6 @@ typedef unsigned long int uint32_t;
#define IEEE_LITTLE_ENDIAN 1
#endif
-#ifdef IEEE_LITTLE_ENDIAN
-#define IEEE_8087 1
-#endif
-
-#ifdef IEEE_BIG_ENDIAN
-#define IEEE_MC68k 1
-#endif
-
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
# undef WORDS_BIGENDIAN
@@ -69,6 +75,14 @@ typedef unsigned long int uint32_t;
#undef IEEE_LITTLE_ENDIAN
#endif
+#ifdef IEEE_LITTLE_ENDIAN
+#define IEEE_8087 1
+#endif
+
+#ifdef IEEE_BIG_ENDIAN
+#define IEEE_MC68k 1
+#endif
+
#if defined(_MSC_VER)
#define int32_t __int32
#define uint32_t unsigned __int32