com php-src: Fixed bug #79946: NEWS ext/intl/calendar/calendar _methods.cpp ext/intl/config.m4
| From: | Nikita Popov | Date: | Mon, 10 Aug 2020 07:52:22 +0000 |
| Subject: | com php-src: Fixed bug #79946: NEWS ext/intl/calendar/calendar _methods.cpp ext/intl/config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112623@lists.php.net to get a copy of this message | ||
Commit: da0a0a13be320a88173594c3e96394134c5c24c6
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 10 Aug 2020 09:50:55 +0200
Parents: cedf463d1b677e60c5fce516bb52cc6cc79996ae
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da0a0a13be320a88173594c3e96394134c5c24c6
Log:
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.
Bugs:
https://bugs.php.net/79946
Changed paths:
M NEWS
M ext/intl/calendar/calendar_methods.cpp
M ext/intl/config.m4
Diff:
diff --git a/NEWS b/NEWS
index 27f853b4fb2..9a5c78f9cf9 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 b6ef461e9e8..df3fc24c61a 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 <inttypes.h>
#include "../intl_cppshims.h"
diff --git a/ext/intl/config.m4 b/ext/intl/config.m4
index 7285f75e06a..b511f00451b 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 \