diff options
author | Xinchen Hui <laruence@gmail.com> | 2017-04-10 14:49:13 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2017-04-10 14:49:13 +0800 |
commit | 696bd37e6757d77dc7ed44f3ea6451944ebaba96 (patch) | |
tree | 94fcb38264a7103e7fc5892d155006c5306da68b | |
parent | 4e9f0a80b9748c03e7bae6339ec051b815f5a569 (diff) | |
parent | 9398f15efd58899df21f5e0cf032b8881fe71f3f (diff) | |
download | php-git-696bd37e6757d77dc7ed44f3ea6451944ebaba96.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
Fixed condition check
Fixed condition check
another place
Conflicts:
ext/mcrypt/mcrypt.c
-rw-r--r-- | ext/bcmath/libbcmath/src/config.h | 2 | ||||
-rw-r--r-- | ext/gd/gdcache.c | 2 | ||||
-rw-r--r-- | ext/sockets/multicast.c | 2 | ||||
-rw-r--r-- | ext/standard/crypt_freesec.h | 2 | ||||
-rw-r--r-- | ext/standard/crypt_sha256.c | 2 | ||||
-rw-r--r-- | ext/standard/crypt_sha512.c | 2 | ||||
-rw-r--r-- | ext/standard/dl.c | 2 | ||||
-rw-r--r-- | ext/standard/html.c | 2 | ||||
-rw-r--r-- | ext/standard/password.c | 2 | ||||
-rw-r--r-- | ext/standard/php_crypt_r.c | 4 | ||||
-rw-r--r-- | ext/standard/random.c | 4 | ||||
-rw-r--r-- | main/fopen_wrappers.c | 2 | ||||
-rw-r--r-- | main/php.h | 2 | ||||
-rw-r--r-- | main/php_ini.c | 6 | ||||
-rw-r--r-- | main/streams/plain_wrapper.c | 6 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg.h | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 2 |
17 files changed, 23 insertions, 23 deletions
diff --git a/ext/bcmath/libbcmath/src/config.h b/ext/bcmath/libbcmath/src/config.h index cc29a15f95..100163d383 100644 --- a/ext/bcmath/libbcmath/src/config.h +++ b/ext/bcmath/libbcmath/src/config.h @@ -1,4 +1,4 @@ -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "../../../../main/config.w32.h" #else #include <php_config.h> diff --git a/ext/gd/gdcache.c b/ext/gd/gdcache.c index e6f9ce1b44..80723ae1e8 100644 --- a/ext/gd/gdcache.c +++ b/ext/gd/gdcache.c @@ -39,7 +39,7 @@ #include "php.h" /* This just seems unessacary */ -#if PHP_WIN32 +#ifdef PHP_WIN32 #define ENABLE_GD_TTF #else #include <php_config.h> diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 9f8bb6b959..24f374c55d 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -627,7 +627,7 @@ static int _php_source_op_to_ipv4_op(enum source_op sop) #endif /* HAS_MCAST_EXT */ -#if PHP_WIN32 +#ifdef PHP_WIN32 int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) { MIB_IPADDRTABLE *addr_table; diff --git a/ext/standard/crypt_freesec.h b/ext/standard/crypt_freesec.h index 860462a2dd..288c216b99 100644 --- a/ext/standard/crypt_freesec.h +++ b/ext/standard/crypt_freesec.h @@ -3,7 +3,7 @@ #ifndef _CRYPT_FREESEC_H #define _CRYPT_FREESEC_H -#if PHP_WIN32 +#ifdef PHP_WIN32 # ifndef inline # define inline __inline # endif diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c index 38c285942e..6a380bdf6a 100644 --- a/ext/standard/crypt_sha256.c +++ b/ext/standard/crypt_sha256.c @@ -68,7 +68,7 @@ struct sha256_ctx { char buffer[128]; /* NB: always correctly aligned for uint32_t. */ }; -#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN)) +#if defined(PHP_WIN32) || (!defined(WORDS_BIGENDIAN)) # define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c index 3cef9a3437..3373182921 100644 --- a/ext/standard/crypt_sha512.c +++ b/ext/standard/crypt_sha512.c @@ -63,7 +63,7 @@ struct sha512_ctx }; -#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN)) +#if defined(PHP_WIN32) || (!defined(WORDS_BIGENDIAN)) # define SWAP(n) \ (((n) << 56) \ | (((n) & 0xff00) << 40) \ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index f897315598..f7933855b0 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -122,7 +122,7 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now) /* load dynamic symbol */ handle = DL_LOAD(libpath); if (!handle) { -#if PHP_WIN32 +#ifdef PHP_WIN32 char *err = GET_DL_ERROR(); if (err && (*err != '\0')) { php_error_docref(NULL, error_type, "Unable to load dynamic library '%s' - %s", libpath, err); diff --git a/ext/standard/html.c b/ext/standard/html.c index 13f9e60275..c6643e2893 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -39,7 +39,7 @@ */ #include "php.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "config.w32.h" #else #include <php_config.h> diff --git a/ext/standard/password.c b/ext/standard/password.c index d814757d95..2d04badd1b 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -35,7 +35,7 @@ #include "argon2.h" #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "win32/winutil.h" #endif diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index 4f0c26acc8..fc5a46a8c3 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -37,7 +37,7 @@ #include <string.h> -#if PHP_WIN32 +#ifdef PHP_WIN32 # include <windows.h> # include <Wincrypt.h> #endif @@ -123,7 +123,7 @@ to64(char *s, int32_t v, int n) } } -#if PHP_WIN32 +#ifdef PHP_WIN32 char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { HCRYPTPROV hCryptProv; HCRYPTHASH ctx, ctx1; diff --git a/ext/standard/random.c b/ext/standard/random.c index 1fd424738c..202d272f58 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -27,7 +27,7 @@ #include "zend_exceptions.h" #include "php_random.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 # include "win32/winutil.h" #endif #ifdef __linux__ @@ -83,7 +83,7 @@ PHP_MSHUTDOWN_FUNCTION(random) /* {{{ */ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw) { -#if PHP_WIN32 +#ifdef PHP_WIN32 /* Defer to CryptGenRandom on Windows */ if (php_win32_get_random_bytes(bytes, size) == FAILURE) { if (should_throw) { diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 578acc2101..5e48610131 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -501,7 +501,7 @@ PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length, (IS_SLASH(filename[1]) || ((filename[1] == '.') && IS_SLASH(filename[2])))) || IS_ABSOLUTE_PATH(filename, filename_length) || -#if PHP_WIN32 +#ifdef PHP_WIN32 /* This should count as an absolute local path as well, however IS_ABSOLUTE_PATH doesn't care about this path form till now. It might be a big thing to extend, thus just a local handling for diff --git a/main/php.h b/main/php.h index 73362eb744..7b1a9256ba 100644 --- a/main/php.h +++ b/main/php.h @@ -323,7 +323,7 @@ END_EXTERN_C() #define STR_PRINT(str) ((str)?(str):"") #ifndef MAXPATHLEN -# if PHP_WIN32 +# ifdef PHP_WIN32 # include "win32/ioutil.h" # define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN # elif PATH_MAX diff --git a/main/php_ini.c b/main/php_ini.c index 3841e53eb4..55a083b18c 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -804,11 +804,11 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len) zval *tmp2; char *ptr; -#if PHP_WIN32 +#ifdef PHP_WIN32 char path_bak[MAXPATHLEN]; #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 /* MAX_PATH is \0-terminated, path_len == MAXPATHLEN would overrun path_bak */ if (path_len >= MAXPATHLEN) { #else @@ -817,7 +817,7 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len) return; } -#if PHP_WIN32 +#ifdef PHP_WIN32 memcpy(path_bak, path, path_len); path_bak[path_len] = 0; TRANSLATE_SLASHES_LOWER(path_bak); diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 55b3d4278c..4cd6cca854 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1310,7 +1310,7 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i return 0; } -#if PHP_WIN32 +#ifdef PHP_WIN32 if (!php_win32_check_trailing_space(url, (int)strlen(url))) { php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT)); return 0; @@ -1337,11 +1337,11 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url #endif mode_t mode; int ret = 0; -#if PHP_WIN32 +#ifdef PHP_WIN32 int url_len = (int)strlen(url); #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 if (!php_win32_check_trailing_space(url, url_len)) { php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT)); return 0; diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index 2a22251219..ef3b017b6d 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -48,7 +48,7 @@ #include "zend_signal.h" #if !defined(_WIN32) && !defined(ZEND_SIGNALS) && defined(HAVE_SIGNAL_H) # include <signal.h> -#elif PHP_WIN32 +#elif defined(PHP_WIN32) # include "win32/signal.h" #endif #include "SAPI.h" diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 05521016ac..544c973eec 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1307,7 +1307,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name) handle = DL_LOAD(*path); if (!handle) { -#if PHP_WIN32 +#ifdef PHP_WIN32 char *err = GET_DL_ERROR(); if (err && err[0]) { phpdbg_error("dl", "type=\"unknown\"", "%s", err); |