From b610404004017ab9df98144f01afb7d5e5848c7d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 17 Jul 2013 03:31:17 -0700 Subject: fixes to zend_ini and output --- main/php.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 17ac8b4fd2..48830f8aec 100644 --- a/main/php.h +++ b/main/php.h @@ -279,8 +279,8 @@ ssize_t pread(int, void *, size_t, off64_t); BEGIN_EXTERN_C() void phperror(char *error); -PHPAPI int php_write(void *buf, uint size TSRMLS_DC); -PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, +PHPAPI zend_str_size_int php_write(void *buf, zend_str_size_uint size TSRMLS_DC); +PHPAPI zend_str_size_int 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 TSRMLS_DC); -- cgit v1.2.1 From f6cf006496124081aeb944dd762390449b33d6c5 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 17 Jul 2013 09:48:13 -0700 Subject: the very first porting try, many things not worky --- main/php.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 48830f8aec..80cd84b494 100644 --- a/main/php.h +++ b/main/php.h @@ -446,6 +446,14 @@ END_EXTERN_C() #endif #endif /* !XtOffsetOf */ +#define php_int_t zend_int_t +#define php_uint_t zend_uint_t +#define PHP_INT_MAX ZEND_INT_MAX +#define PHP_INT_MIN ZEND_INT_MIN +#define PHP_UINT_MAX ZEND_UINT_MAX +#define PHP_SIZE_MAX_LONG ZEND_SIZE_MAX_LONG +#define PHP_SIZE_MAX_INT ZEND_SIZE_MAX_INT + #endif /* -- cgit v1.2.1 From 6d938321ffc43a343b2afcee70d921cc931752d8 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 18 Dec 2013 14:22:47 -0800 Subject: prepare for zend_size_t --- main/php.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index bdafba0c92..ddb30bf290 100644 --- a/main/php.h +++ b/main/php.h @@ -446,13 +446,13 @@ END_EXTERN_C() #endif #endif /* !XtOffsetOf */ +#define php_size_t zend_size_t #define php_int_t zend_int_t #define php_uint_t zend_uint_t #define PHP_INT_MAX ZEND_INT_MAX #define PHP_INT_MIN ZEND_INT_MIN #define PHP_UINT_MAX ZEND_UINT_MAX -#define PHP_SIZE_MAX_LONG ZEND_SIZE_MAX_LONG -#define PHP_SIZE_MAX_INT ZEND_SIZE_MAX_INT +#define PHP_SIZE_MAX ZEND_SIZE_MAX #endif -- cgit v1.2.1 From b1abe4ca21e10b04a8bae2d00e8113f4b2b02567 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 18 Dec 2013 14:46:44 -0800 Subject: mass replacement for zend_size_t/php_size_t --- main/php.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index ddb30bf290..0ea40743fa 100644 --- a/main/php.h +++ b/main/php.h @@ -65,6 +65,14 @@ # define PHP_EOL "\n" #endif +#define php_size_t zend_size_t +#define php_int_t zend_int_t +#define php_uint_t zend_uint_t +#define PHP_INT_MAX ZEND_INT_MAX +#define PHP_INT_MIN ZEND_INT_MIN +#define PHP_UINT_MAX ZEND_UINT_MAX +#define PHP_SIZE_MAX ZEND_SIZE_MAX + #ifdef NETWARE /* For php_get_uname() function */ #define PHP_UNAME "NetWare" @@ -279,8 +287,8 @@ ssize_t pread(int, void *, size_t, off64_t); BEGIN_EXTERN_C() void phperror(char *error); -PHPAPI zend_str_size_int php_write(void *buf, zend_str_size_uint size TSRMLS_DC); -PHPAPI zend_str_size_int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, +PHPAPI php_size_t php_write(void *buf, php_size_t size TSRMLS_DC); +PHPAPI php_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 TSRMLS_DC); @@ -446,14 +454,6 @@ END_EXTERN_C() #endif #endif /* !XtOffsetOf */ -#define php_size_t zend_size_t -#define php_int_t zend_int_t -#define php_uint_t zend_uint_t -#define PHP_INT_MAX ZEND_INT_MAX -#define PHP_INT_MIN ZEND_INT_MIN -#define PHP_UINT_MAX ZEND_UINT_MAX -#define PHP_SIZE_MAX ZEND_SIZE_MAX - #endif /* -- cgit v1.2.1 From 8ee2a4a9b5de682c0b37670e1f4f86242b1650ce Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 16 Aug 2014 11:16:11 +0200 Subject: first shot on merging the core fro the int64 branch --- main/php.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index f9cfd2d7f2..68e94869e0 100644 --- a/main/php.h +++ b/main/php.h @@ -66,6 +66,14 @@ # define PHP_EOL "\n" #endif +#define php_size_t zend_size_t +#define php_int_t zend_int_t +#define php_uint_t zend_uint_t +#define PHP_INT_MAX ZEND_INT_MAX +#define PHP_INT_MIN ZEND_INT_MIN +#define PHP_UINT_MAX ZEND_UINT_MAX +#define PHP_SIZE_MAX ZEND_SIZE_MAX + #ifdef NETWARE /* For php_get_uname() function */ #define PHP_UNAME "NetWare" @@ -280,8 +288,8 @@ ssize_t pread(int, void *, size_t, off64_t); BEGIN_EXTERN_C() void phperror(char *error); -PHPAPI int php_write(void *buf, uint size TSRMLS_DC); -PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, +PHPAPI php_size_t php_write(void *buf, php_size_t size TSRMLS_DC); +PHPAPI php_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 TSRMLS_DC); -- cgit v1.2.1 From 398a1cc655c4b5076aac2492765da154f9fad9e5 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 14:39:24 +0200 Subject: added php_off_t alias --- main/php.h | 1 + 1 file changed, 1 insertion(+) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 68e94869e0..a271f0d5fc 100644 --- a/main/php.h +++ b/main/php.h @@ -69,6 +69,7 @@ #define php_size_t zend_size_t #define php_int_t zend_int_t #define php_uint_t zend_uint_t +#define php_off_t zend_off_t #define PHP_INT_MAX ZEND_INT_MAX #define PHP_INT_MIN ZEND_INT_MIN #define PHP_UINT_MAX ZEND_UINT_MAX -- cgit v1.2.1 From c3e3c98ec666812daaaca896cf5ef758a8a6df14 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:24:55 +0200 Subject: master renames phase 1 --- main/php.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index a271f0d5fc..fc105386db 100644 --- a/main/php.h +++ b/main/php.h @@ -66,9 +66,9 @@ # define PHP_EOL "\n" #endif -#define php_size_t zend_size_t -#define php_int_t zend_int_t -#define php_uint_t zend_uint_t +#define php_size_t size_t +#define zend_long zend_long +#define zend_ulong zend_ulong #define php_off_t zend_off_t #define PHP_INT_MAX ZEND_INT_MAX #define PHP_INT_MIN ZEND_INT_MIN -- cgit v1.2.1 From 4d997f63d98c663b2d9acccd3655572652f61c7d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 20:22:49 +0200 Subject: master renames phase 3 --- main/php.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index fc105386db..8ee83e424d 100644 --- a/main/php.h +++ b/main/php.h @@ -66,15 +66,6 @@ # define PHP_EOL "\n" #endif -#define php_size_t size_t -#define zend_long zend_long -#define zend_ulong zend_ulong -#define php_off_t zend_off_t -#define PHP_INT_MAX ZEND_INT_MAX -#define PHP_INT_MIN ZEND_INT_MIN -#define PHP_UINT_MAX ZEND_UINT_MAX -#define PHP_SIZE_MAX ZEND_SIZE_MAX - #ifdef NETWARE /* For php_get_uname() function */ #define PHP_UNAME "NetWare" @@ -289,8 +280,8 @@ ssize_t pread(int, void *, size_t, off64_t); BEGIN_EXTERN_C() void phperror(char *error); -PHPAPI php_size_t php_write(void *buf, php_size_t size TSRMLS_DC); -PHPAPI php_size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, +PHPAPI size_t php_write(void *buf, size_t size TSRMLS_DC); +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 TSRMLS_DC); -- cgit v1.2.1 From 202e8db1dc8e1203039327d81ce6fd82c1c2d909 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 26 Aug 2014 11:23:25 +0200 Subject: fixed several long vs zend_long casts --- 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 8ee83e424d..11a8a64401 100644 --- a/main/php.h +++ b/main/php.h @@ -434,7 +434,7 @@ END_EXTERN_C() #else /* ! (CRAY || __arm) */ #define XtOffset(p_type, field) \ - ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) + ((zend_long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) #endif /* !CRAY */ #endif /* ! XtOffset */ -- cgit v1.2.1 From 25f5ba94aca1e89ee5f0c66513e58826afa3b853 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 31 Aug 2014 11:45:11 -0400 Subject: remove a few gcc format attributes from some printf-like functions Since now PHP's printf-like functions have many custom specifiers, the amount of false-positives wasnt worth it --- main/php.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 11a8a64401..47e1e10733 100644 --- a/main/php.h +++ b/main/php.h @@ -281,12 +281,9 @@ ssize_t pread(int, void *, size_t, off64_t); BEGIN_EXTERN_C() void phperror(char *error); PHPAPI size_t php_write(void *buf, size_t size TSRMLS_DC); -PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, - 2); +PHPAPI size_t php_printf(const char *format, ...); PHPAPI int php_get_module_initialized(void); PHPAPI void php_log_err(char *log_message TSRMLS_DC); -int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); -int cfgparse(void); END_EXTERN_C() #define php_error zend_error @@ -308,12 +305,9 @@ 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 TSRMLS_DC, 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 TSRMLS_DC, 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 TSRMLS_DC, 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); +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...); +PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...); +PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...); #ifdef PHP_WIN32 PHPAPI void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2 TSRMLS_DC); #endif -- cgit v1.2.1 From fdd1e96f3e90895134c4082bde8cad475378deac Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 3 Sep 2014 15:22:08 +0200 Subject: Revert "remove a few gcc format attributes from some printf-like functions" This reverts commit 25f5ba94aca1e89ee5f0c66513e58826afa3b853. --- main/php.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 47e1e10733..11a8a64401 100644 --- a/main/php.h +++ b/main/php.h @@ -281,9 +281,12 @@ ssize_t pread(int, void *, size_t, off64_t); BEGIN_EXTERN_C() void phperror(char *error); PHPAPI size_t php_write(void *buf, size_t size TSRMLS_DC); -PHPAPI size_t php_printf(const char *format, ...); +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 TSRMLS_DC); +int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); +int cfgparse(void); END_EXTERN_C() #define php_error zend_error @@ -305,9 +308,12 @@ 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 TSRMLS_DC, int type, const char *format, ...); -PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...); -PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...); +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, 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 TSRMLS_DC, 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 TSRMLS_DC, 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 TSRMLS_DC); #endif -- cgit v1.2.1