mirror of
https://github.com/php/php-src.git
synced 2024-11-23 01:44:06 +08:00
50b3a0d011
A common convention is to name internal C header files as `*_int.h`. Since a couple of these are actually installed, we add comments that this is not supposed to happen, (a) to avoid installing further internal headers, and (b) to pave the way to fix this in the next major PHP version. Somewhat special is php_gmp_int.h, where "int" is meant as abbreviation for "interface". Another common convention is appending `_priv` or `_private`, but since there have not been any issues regarding these headers so far, we refrain from adding respective comments to these headers. Anyhow, it might be a good idea to introduce some common naming convention for such internal/private headers.
110 lines
2.8 KiB
C
110 lines
2.8 KiB
C
/*
|
|
+----------------------------------------------------------------------+
|
|
| Zend Engine |
|
|
+----------------------------------------------------------------------+
|
|
| Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
|
|
+----------------------------------------------------------------------+
|
|
| This source file is subject to version 2.00 of the Zend license, |
|
|
| that is bundled with this package in the file LICENSE, and is |
|
|
| available through the world-wide-web at the following url: |
|
|
| http://www.zend.com/license/2_00.txt. |
|
|
| If you did not receive a copy of the Zend license and are unable to |
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
| license@zend.com so we can mail you a copy immediately. |
|
|
+----------------------------------------------------------------------+
|
|
| Authors: Anatol Belski <ab@php.net> |
|
|
+----------------------------------------------------------------------+
|
|
*/
|
|
|
|
/* internal header; not supposed to be installed; FIXME but unfortunately is */
|
|
|
|
#ifndef ZEND_STRTOD_INT_H
|
|
#define ZEND_STRTOD_INT_H
|
|
|
|
#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. */
|
|
#define Omit_Private_Memory 1
|
|
|
|
/* HEX strings aren't supported as per
|
|
https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings */
|
|
#define NO_HEX_FP 1
|
|
|
|
#include <inttypes.h>
|
|
|
|
#ifdef USE_LOCALE
|
|
#undef USE_LOCALE
|
|
#endif
|
|
|
|
#ifndef NO_INFNAN_CHECK
|
|
#define NO_INFNAN_CHECK
|
|
#endif
|
|
|
|
#ifndef NO_ERRNO
|
|
#define NO_ERRNO
|
|
#endif
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
#define IEEE_BIG_ENDIAN 1
|
|
#else
|
|
#define IEEE_LITTLE_ENDIAN 1
|
|
#endif
|
|
|
|
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
|
|
# if defined(__LITTLE_ENDIAN__)
|
|
# undef WORDS_BIGENDIAN
|
|
# else
|
|
# if defined(__BIG_ENDIAN__)
|
|
# define WORDS_BIGENDIAN
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
#if defined(__arm__) && !defined(__VFP_FP__)
|
|
/*
|
|
* * Although the CPU is little endian the FP has different
|
|
* * byte and word endianness. The byte order is still little endian
|
|
* * but the word order is big endian.
|
|
* */
|
|
#define IEEE_BIG_ENDIAN
|
|
#undef IEEE_LITTLE_ENDIAN
|
|
#endif
|
|
|
|
#ifdef __vax__
|
|
#define VAX
|
|
#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)
|
|
#ifndef int32_t
|
|
#define int32_t __int32
|
|
#endif
|
|
#ifndef uint32_t
|
|
#define uint32_t unsigned __int32
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* ZEND_STRTOD_INT_H */
|