From c568ffe5171d942161fc8dda066bce844bdef676 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 16 Jul 2015 22:48:56 +0200 Subject: Ignore getcwd return in zend_compile To do this move the php_ignore_value macro to ZEND_IGNORE_VALUE. --- main/php.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 1d2c2dc099..3ebaa1a0b9 100644 --- a/main/php.h +++ b/main/php.h @@ -257,11 +257,7 @@ END_EXTERN_C() # endif #endif -#if defined(__GNUC__) && __GNUC__ >= 4 -# define php_ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) -#else -# define php_ignore_value(x) ((void) (x)) -#endif +#define php_ignore_value(x) ZEND_IGNORE_VALUE(x) /* global variables */ #if !defined(PHP_WIN32) -- cgit v1.2.1 From 96ea4a0ac603f20d0f3128eba7e5085001fb6f68 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 24 Aug 2015 18:07:59 +0300 Subject: Mark error functions as "cold" --- main/php.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 3ebaa1a0b9..2a461377f4 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,7 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -PHPAPI void php_log_err(char *log_message); +PHPAPI ZEND_COLD void php_log_err(char *log_message); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C() @@ -295,7 +295,7 @@ static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handli } static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {} -PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); +PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); #ifdef ZTS #define PHP_ATTR_FMT_OFFSET 1 @@ -304,14 +304,14 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c #endif /* PHPAPI void php_error(int type, const char *format, ...); */ -PHPAPI void php_error_docref0(const char *docref, int type, const char *format, ...) +PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); -PHPAPI void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...) +PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); -PHPAPI void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...) +PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); #ifdef PHP_WIN32 -PHPAPI void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2); +PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2); #endif END_EXTERN_C() -- cgit v1.2.1 From dcbbf7c38d45fd06752b7298ed765733ca2f8d41 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 12 Oct 2015 20:17:22 +0200 Subject: increase API versions --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 2a461377f4..90a230705a 100644 --- a/main/php.h +++ b/main/php.h @@ -26,7 +26,7 @@ #include #endif -#define PHP_API_VERSION 20131218 +#define PHP_API_VERSION 20151012 #define PHP_HAVE_STREAMS #define YYDEBUG 0 #define PHP_DEFAULT_CHARSET "UTF-8" -- cgit v1.2.1 From 49493a2dcfb2cd1758b69b13d9006ead3be0e066 Mon Sep 17 00:00:00 2001 From: Lior Kaplan Date: Fri, 1 Jan 2016 19:19:27 +0200 Subject: Happy new year (Update copyright to 2016) --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 243012ccc6..c6b897d36a 100644 --- a/main/php.h +++ b/main/php.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | -- cgit v1.2.1 From af66ad28571fc3d55c33bd3b301a5508192bcdac Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 4 Feb 2016 13:31:21 +0100 Subject: Remove use of register keyword in headers Headers must be C++ compatible -- this throws warnings. The register keyword is not used for optimization, at least not in optimized builds. --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 14a52a6476..cbe6c45adb 100644 --- a/main/php.h +++ b/main/php.h @@ -330,7 +330,7 @@ END_EXTERN_C() BEGIN_EXTERN_C() PHPAPI extern int (*php_register_internal_extensions_func)(void); PHPAPI int php_register_internal_extensions(void); -PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void *)); +PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)); PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata); PHPAPI void php_com_initialize(void); PHPAPI char *php_get_current_user(void); -- cgit v1.2.1 From 59833783641622160903d56c0aa522db01b59f4c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Feb 2016 13:50:59 +0100 Subject: Fix format attributes in ZTS --- main/php.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 14a52a6476..bb06a3edac 100644 --- a/main/php.h +++ b/main/php.h @@ -297,19 +297,13 @@ static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {} PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); -#ifdef ZTS -#define PHP_ATTR_FMT_OFFSET 1 -#else -#define PHP_ATTR_FMT_OFFSET 0 -#endif - /* PHPAPI void php_error(int type, const char *format, ...); */ PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...) - PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); + PHP_ATTRIBUTE_FORMAT(printf, 3, 4); PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...) - PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); + PHP_ATTRIBUTE_FORMAT(printf, 4, 5); PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...) - PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); + PHP_ATTRIBUTE_FORMAT(printf, 5, 6); #ifdef PHP_WIN32 PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2); #endif -- cgit v1.2.1 From 3edf7d960cb14f2ee45944e7c567af92af25bda1 Mon Sep 17 00:00:00 2001 From: Jani Ollikainen Date: Tue, 29 Dec 2015 12:18:41 +0200 Subject: Logging to syslog with dynamic error levels (related to #49467) --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index d0ec07c82e..d9a387e964 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,7 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -PHPAPI ZEND_COLD void php_log_err(char *log_message); +PHPAPI ZEND_COLD void php_log_err(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C() -- cgit v1.2.1 From 0a04f6144884792e6b9fb28bc1b6cfe3772a446f Mon Sep 17 00:00:00 2001 From: Jani Ollikainen Date: Wed, 6 Apr 2016 14:14:41 +0300 Subject: Added backwards compability with php_log_err by using macro --- main/php.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index d9a387e964..9e7fe46790 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,8 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -PHPAPI ZEND_COLD void php_log_err(char *log_message, int syslog_type_int); +#define php_log_err(msg) php_log_err_with_serevity(msg, LOG_NOTICE) +PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C() -- cgit v1.2.1 From 73fd1fc6e567f78e8d4188690b615264a8962b66 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 2 Jun 2016 13:28:09 +0200 Subject: fix typo --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 9e7fe46790..239aef2bb0 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,7 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -#define php_log_err(msg) php_log_err_with_serevity(msg, LOG_NOTICE) +#define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE) PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); -- cgit v1.2.1 From d2bc82586b67882fdcdabac8e05cfbb4104bfd47 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 8 Jun 2016 08:10:09 +0200 Subject: fix php_log_err macro --- main/php.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 239aef2bb0..ed6a4d7189 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,12 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); +#ifdef HAVE_SYSLOG_H +#include "php_syslog.h" #define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE) +#else +#define php_log_err(msg) php_log_err_with_severity(msg, 5) +#endif PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); -- cgit v1.2.1