]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in main folder
authorGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 15:50:35 +0000 (17:50 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 20:01:00 +0000 (22:01 +0200)
main/explicit_bzero.c
main/main.c
main/php.h

index b3c59813d7ea36ac1d0f398c3aee639c2c9b1437..5650932a3c8ff7f3816626e35102d4375eedf434 100644 (file)
@@ -28,7 +28,7 @@
 
 PHPAPI void php_explicit_bzero(void *dst, size_t siz)
 {
-#if HAVE_EXPLICIT_MEMSET
+#ifdef HAVE_EXPLICIT_MEMSET
     explicit_memset(dst, 0, siz);
 #elif defined(PHP_WIN32)
        RtlSecureZeroMemory(dst, siz);
index 59cac41afc8f3406ae834023ed8307eb4ae02406..48ef5060bd1b9ae310c1998c437c78893d14d5c5 100644 (file)
@@ -2498,7 +2498,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
 {
        zend_file_handle *prepend_file_p, *append_file_p;
        zend_file_handle prepend_file, append_file;
-#if HAVE_BROKEN_GETCWD
+#ifdef HAVE_BROKEN_GETCWD
        volatile int old_cwd_fd = -1;
 #else
        char *old_cwd;
@@ -2525,7 +2525,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
                PG(during_request_startup) = 0;
 
                if (primary_file->filename && !(SG(options) & SAPI_OPTION_NO_CHDIR)) {
-#if HAVE_BROKEN_GETCWD
+#ifdef HAVE_BROKEN_GETCWD
                        /* this looks nasty to me */
                        old_cwd_fd = open(".", 0);
 #else
@@ -2590,7 +2590,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
                } zend_end_try();
        }
 
-#if HAVE_BROKEN_GETCWD
+#ifdef HAVE_BROKEN_GETCWD
        if (old_cwd_fd != -1) {
                fchdir(old_cwd_fd);
                close(old_cwd_fd);
index 87f7d000f9fde90c49d0c83128b72919f817afb7..b6d9669be41500f27f290636d756a40341124e97 100644 (file)
@@ -126,7 +126,7 @@ typedef int pid_t;
 #endif
 #include <assert.h>
 
-#if HAVE_UNIX_H
+#ifdef HAVE_UNIX_H
 #include <unix.h>
 #endif
 
@@ -293,10 +293,10 @@ END_EXTERN_C()
 #define php_ignore_value(x) ZEND_IGNORE_VALUE(x)
 
 /* global variables */
-#if !defined(PHP_WIN32)
+#ifndef PHP_WIN32
 #define php_sleep sleep
 extern char **environ;
-#endif /* !defined(PHP_WIN32) */
+#endif /* ifndef PHP_WIN32 */
 
 #ifdef PHP_PWRITE_64
 ssize_t pwrite(int, void *, size_t, off64_t);