1 /* 2 +----------------------------------------------------------------------+ 3 | Zend Engine | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) Zend Technologies Ltd. (http://www.zend.com) | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 2.00 of the Zend license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.zend.com/license/2_00.txt. | 11 | If you did not receive a copy of the Zend license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@zend.com so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Authors: Anatol Belski <ab@php.net> | 16 +----------------------------------------------------------------------+ 17 */ 18 19 /* internal header; not supposed to be installed; FIXME but unfortunately is */ 20 21 #ifndef ZEND_STRTOD_INT_H 22 #define ZEND_STRTOD_INT_H 23 24 #ifdef ZTS 25 #include <TSRM.h> 26 #endif 27 28 #include <stddef.h> 29 #include <stdio.h> 30 #include <ctype.h> 31 #include <stdarg.h> 32 #include <math.h> 33 34 #ifdef HAVE_SYS_TYPES_H 35 #include <sys/types.h> 36 #endif 37 38 /* TODO check to undef this option, this might 39 make more perf. destroy_freelist() 40 should be adapted then. */ 41 #define Omit_Private_Memory 1 42 43 /* HEX strings aren't supported as per 44 https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings */ 45 #define NO_HEX_FP 1 46 47 #include <inttypes.h> 48 49 #ifdef USE_LOCALE 50 #undef USE_LOCALE 51 #endif 52 53 #ifndef NO_INFNAN_CHECK 54 #define NO_INFNAN_CHECK 55 #endif 56 57 #ifndef NO_ERRNO 58 #define NO_ERRNO 59 #endif 60 61 #ifdef WORDS_BIGENDIAN 62 #define IEEE_BIG_ENDIAN 1 63 #else 64 #define IEEE_LITTLE_ENDIAN 1 65 #endif 66 67 #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) 68 # if defined(__LITTLE_ENDIAN__) 69 # undef WORDS_BIGENDIAN 70 # else 71 # if defined(__BIG_ENDIAN__) 72 # define WORDS_BIGENDIAN 73 # endif 74 # endif 75 #endif 76 77 #if defined(__arm__) && !defined(__VFP_FP__) 78 /* 79 * * Although the CPU is little endian the FP has different 80 * * byte and word endianness. The byte order is still little endian 81 * * but the word order is big endian. 82 * */ 83 #define IEEE_BIG_ENDIAN 84 #undef IEEE_LITTLE_ENDIAN 85 #endif 86 87 #ifdef __vax__ 88 #define VAX 89 #undef IEEE_LITTLE_ENDIAN 90 #endif 91 92 #ifdef IEEE_LITTLE_ENDIAN 93 #define IEEE_8087 1 94 #endif 95 96 #ifdef IEEE_BIG_ENDIAN 97 #define IEEE_MC68k 1 98 #endif 99 100 #if defined(_MSC_VER) 101 #ifndef int32_t 102 #define int32_t __int32 103 #endif 104 #ifndef uint32_t 105 #define uint32_t unsigned __int32 106 #endif 107 #endif 108 109 #endif /* ZEND_STRTOD_INT_H */ 110