From: Nikita Popov Date: Mon, 10 Aug 2020 07:50:55 +0000 (+0200) Subject: Fixed bug #79946 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da0a0a13be320a88173594c3e96394134c5c24c6;p=php Fixed bug #79946 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. --- diff --git a/NEWS b/NEWS index 27f853b4fb..9a5c78f9cf 100644 --- 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 diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index b6ef461e9e..df3fc24c61 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -16,7 +16,6 @@ #include "config.h" #endif -#define __STDC_FORMAT_MACROS #include #include "../intl_cppshims.h" diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 index 7285f75e06..b511f00451 100644 --- a/ext/intl/config.m4 +++ b/ext/intl/config.m4 @@ -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 \