Fix [-Wundef] warning in main folder

This commit is contained in:
George Peter Banyard 2020-05-12 17:50:35 +02:00
parent 3689807998
commit 1df3f97c21
3 changed files with 7 additions and 7 deletions

View 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);

View 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);

View 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);