root/Zend/zend_strtod_int.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2    +----------------------------------------------------------------------+
   3    | Zend Engine                                                          |
   4    +----------------------------------------------------------------------+
   5    | Copyright (c) 1998-2016 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 #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 /* TODO check to undef this option, this might
  37         make more perf. destroy_freelist() 
  38         should be adapted then. */
  39 #define Omit_Private_Memory 1
  40 
  41 /* HEX strings aren't supported as per
  42         https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings */
  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  *  * Although the CPU is little endian the FP has different
  90  *   * byte and word endianness. The byte order is still little endian
  91  *    * but the word order is big endian.
  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 /* ZEND_STRTOD_INT_H */
 140 

/* [<][>][^][v][top][bottom][index][help] */