summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-04-10 14:47:42 +0800
committerXinchen Hui <laruence@gmail.com>2017-04-10 14:47:42 +0800
commit65d77812fcc0275aed58fd74b8d17d09a7e21ef2 (patch)
tree2ca8b2dc909ab2d88a949b6846cf128e9cb21538 /main
parentd65459f4eb764a77668a8f870ea85f3bbd12a13c (diff)
parent4bebcb84ad47e687fc3ef3a01b875aa04dfb72d0 (diff)
downloadphp-git-65d77812fcc0275aed58fd74b8d17d09a7e21ef2.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed condition check
Diffstat (limited to 'main')
-rw-r--r--main/fopen_wrappers.c2
-rw-r--r--main/php_ini.c6
-rw-r--r--main/streams/plain_wrapper.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 17dd27a6ff..e1f89ce5cc 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -505,7 +505,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_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 6bc0138f29..25eacceec5 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;