]> granicus.if.org Git - php/commitdiff
Fixed bug #79946
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 10 Aug 2020 07:50:55 +0000 (09:50 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 10 Aug 2020 07:52:22 +0000 (09:52 +0200)
Declare __STDC_CONSTANT_MACROS and __STDC_FORMAT_MACROS via -D
to make sure they are declared before the first stdint.h include.
We also define these in php_stdint.h, but don't always include that
file first.

This is necessary for old compilers that use C99 rather than C11
semantics for stdint.h.

NEWS
ext/intl/calendar/calendar_methods.cpp
ext/intl/config.m4

diff --git a/NEWS b/NEWS
index 27f853b4fb2dd152fdfd3b88207852d26a608838..9a5c78f9cf9cbbbab3609b3af61a62f174c0ab2d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ PHP                                                                        NEWS
     in the stack trace). (Nikita)
   . Fixed bug #79897 (Promoted constructor params with attribs cause crash).
     (Deus Kane)
+  . Fixed bug #79946 (Build fails due to undeclared UINT32_C). (Nikita)
 
 - Date:
   . Fixed bug #60302 (DateTime::createFromFormat should new static(), not new
index b6ef461e9e8fd76691f87fed20acd0b12721df1b..df3fc24c61ab2c06eb2aa5b97d13c6523bc148dd 100644 (file)
@@ -16,7 +16,6 @@
 #include "config.h"
 #endif
 
-#define __STDC_FORMAT_MACROS
 #include <inttypes.h>
 
 #include "../intl_cppshims.h"
index 7285f75e06a3e2ab0e79dbff67700cde0729adb0..b511f00451b81ba086d2c37b1ad10c12b330e7f9 100644 (file)
@@ -6,7 +6,7 @@ PHP_ARG_ENABLE([intl],
 if test "$PHP_INTL" != "no"; then
   PHP_SETUP_ICU(INTL_SHARED_LIBADD)
   PHP_SUBST(INTL_SHARED_LIBADD)
-  INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
+  INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
   PHP_NEW_EXTENSION(intl, php_intl.c \
     intl_error.c \
     intl_convert.c \