1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef ZEND_STRTOD_INT_H
20 #define ZEND_STRTOD_INT_H
21
22 #ifdef ZTS
23 #include <TSRM.h>
24 #endif
25
26 #include <stddef.h>
27 #include <stdio.h>
28 #include <ctype.h>
29 #include <stdarg.h>
30 #include <math.h>
31
32 #ifdef HAVE_SYS_TYPES_H
33 #include <sys/types.h>
34 #endif
35
36
37
38
39 #define Omit_Private_Memory 1
40
41
42
43 #define NO_HEX_FP 1
44
45 #if defined(HAVE_INTTYPES_H)
46 #include <inttypes.h>
47 #elif defined(HAVE_STDINT_H)
48 #include <stdint.h>
49 #endif
50
51 #ifndef HAVE_INT32_T
52 # if SIZEOF_INT == 4
53 typedef int int32_t;
54 # elif SIZEOF_LONG == 4
55 typedef long int int32_t;
56 # endif
57 #endif
58
59 #ifndef HAVE_UINT32_T
60 # if SIZEOF_INT == 4
61 typedef unsigned int uint32_t;
62 # elif SIZEOF_LONG == 4
63 typedef unsigned long int uint32_t;
64 # endif
65 #endif
66
67 #ifdef HAVE_LOCALE_H
68 #define USE_LOCALE 1
69 #endif
70
71 #ifdef WORDS_BIGENDIAN
72 #define IEEE_BIG_ENDIAN 1
73 #else
74 #define IEEE_LITTLE_ENDIAN 1
75 #endif
76
77 #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
78 # if defined(__LITTLE_ENDIAN__)
79 # undef WORDS_BIGENDIAN
80 # else
81 # if defined(__BIG_ENDIAN__)
82 # define WORDS_BIGENDIAN
83 # endif
84 # endif
85 #endif
86
87 #if defined(__arm__) && !defined(__VFP_FP__)
88
89
90
91
92
93 #define IEEE_BIG_ENDIAN
94 #undef IEEE_LITTLE_ENDIAN
95 #endif
96
97 #ifdef __vax__
98 #define VAX
99 #undef IEEE_LITTLE_ENDIAN
100 #endif
101
102 #ifdef IEEE_LITTLE_ENDIAN
103 #define IEEE_8087 1
104 #endif
105
106 #ifdef IEEE_BIG_ENDIAN
107 #define IEEE_MC68k 1
108 #endif
109
110 #if defined(_MSC_VER)
111 #ifndef int32_t
112 #define int32_t __int32
113 #endif
114 #ifndef uint32_t
115 #define uint32_t unsigned __int32
116 #endif
117 #endif
118
119 #ifdef ZTS
120 #define MULTIPLE_THREADS 1
121
122 #define ACQUIRE_DTOA_LOCK(x) \
123 if (0 == x) { \
124 tsrm_mutex_lock(dtoa_mutex); \
125 } else if (1 == x) { \
126 tsrm_mutex_lock(pow5mult_mutex); \
127 }
128
129 #define FREE_DTOA_LOCK(x) \
130 if (0 == x) { \
131 tsrm_mutex_unlock(dtoa_mutex); \
132 } else if (1 == x) { \
133 tsrm_mutex_unlock(pow5mult_mutex); \
134 }
135
136
137 #endif
138
139 #endif
140