mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
Enable definitions of stdint.h limits/constants used by Zend/zend_long.h
Define __STDC_LIMITS_MACROS and __STDC_CONSTANT_MACROS prior to including stdint.h for the first time so that it defines the INT64_MAX / INT64_C / etc... macros we use elsewhere when building for C++ (C already gets these).
This commit is contained in:
parent
7ad1703413
commit
29a8981c81
@ -42,6 +42,21 @@
|
|||||||
|
|
||||||
#include "php_config.h"
|
#include "php_config.h"
|
||||||
|
|
||||||
|
#if HAVE_STDINT_H && defined(__cplusplus)
|
||||||
|
/* C99 requires these for C++ to get the definitions
|
||||||
|
* of INT64_MAX and other macros used by Zend/zend_long.h
|
||||||
|
* C11 drops this requirement, so these effectively
|
||||||
|
* just backport that piece of behavior.
|
||||||
|
*
|
||||||
|
* These defines are placed here instead of
|
||||||
|
* with the include below, because sys/types
|
||||||
|
* and inttypes may include stdint themselves.
|
||||||
|
* And these definitions MUST come first.
|
||||||
|
*/
|
||||||
|
# define __STDC_LIMIT_MACROS
|
||||||
|
# define __STDC_CONSTANT_MACROS
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_TYPES_H
|
#if HAVE_SYS_TYPES_H
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user