Skip to content

Commit 1df3f97

Browse files
committed
Fix [-Wundef] warning in main folder
1 parent 3689807 commit 1df3f97

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

main/explicit_bzero.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
PHPAPI void php_explicit_bzero(void *dst, size_t siz)
3030
{
31-
#if HAVE_EXPLICIT_MEMSET
31+
#ifdef HAVE_EXPLICIT_MEMSET
3232
explicit_memset(dst, 0, siz);
3333
#elif defined(PHP_WIN32)
3434
RtlSecureZeroMemory(dst, siz);

main/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
24982498
{
24992499
zend_file_handle *prepend_file_p, *append_file_p;
25002500
zend_file_handle prepend_file, append_file;
2501-
#if HAVE_BROKEN_GETCWD
2501+
#ifdef HAVE_BROKEN_GETCWD
25022502
volatile int old_cwd_fd = -1;
25032503
#else
25042504
char *old_cwd;
@@ -2525,7 +2525,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
25252525
PG(during_request_startup) = 0;
25262526

25272527
if (primary_file->filename && !(SG(options) & SAPI_OPTION_NO_CHDIR)) {
2528-
#if HAVE_BROKEN_GETCWD
2528+
#ifdef HAVE_BROKEN_GETCWD
25292529
/* this looks nasty to me */
25302530
old_cwd_fd = open(".", 0);
25312531
#else
@@ -2590,7 +2590,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
25902590
} zend_end_try();
25912591
}
25922592

2593-
#if HAVE_BROKEN_GETCWD
2593+
#ifdef HAVE_BROKEN_GETCWD
25942594
if (old_cwd_fd != -1) {
25952595
fchdir(old_cwd_fd);
25962596
close(old_cwd_fd);

main/php.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ typedef int pid_t;
126126
#endif
127127
#include <assert.h>
128128

129-
#if HAVE_UNIX_H
129+
#ifdef HAVE_UNIX_H
130130
#include <unix.h>
131131
#endif
132132

@@ -293,10 +293,10 @@ END_EXTERN_C()
293293
#define php_ignore_value(x) ZEND_IGNORE_VALUE(x)
294294

295295
/* global variables */
296-
#if !defined(PHP_WIN32)
296+
#ifndef PHP_WIN32
297297
#define php_sleep sleep
298298
extern char **environ;
299-
#endif /* !defined(PHP_WIN32) */
299+
#endif /* ifndef PHP_WIN32 */
300300

301301
#ifdef PHP_PWRITE_64
302302
ssize_t pwrite(int, void *, size_t, off64_t);

0 commit comments

Comments
 (0)