summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/filepro/filepro.c2
-rw-r--r--ext/imap/imap.c4
-rw-r--r--ext/session/mod_files.c4
-rw-r--r--ext/session/session.c2
-rw-r--r--ext/snmp/snmp.c2
-rw-r--r--ext/standard/array.c2
-rw-r--r--ext/standard/basic_functions.c4
-rw-r--r--ext/standard/basic_functions.h2
-rw-r--r--ext/standard/crypt.c2
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/dl.c4
-rw-r--r--ext/standard/dns.c4
-rw-r--r--ext/standard/dns.h2
-rw-r--r--ext/standard/exec.c6
-rw-r--r--ext/standard/file.c12
-rw-r--r--ext/standard/filestat.c6
-rw-r--r--ext/standard/flock_compat.c6
-rw-r--r--ext/standard/flock_compat.h4
-rw-r--r--ext/standard/fsock.c12
-rw-r--r--ext/standard/fsock.h2
-rw-r--r--ext/standard/info.c6
-rw-r--r--ext/standard/lcg.c2
-rw-r--r--ext/standard/link.c4
-rw-r--r--ext/standard/mail.c10
-rw-r--r--ext/standard/microtime.c2
-rw-r--r--ext/standard/pack.c4
-rw-r--r--ext/standard/pageinfo.c4
-rw-r--r--ext/standard/parsedate.y4
-rw-r--r--ext/standard/string.c8
-rw-r--r--ext/standard/syslog.c6
-rw-r--r--ext/standard/uniqid.c4
-rw-r--r--ext/zlib/zlib.c10
32 files changed, 74 insertions, 74 deletions
diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c
index 5e64632512..cc055076aa 100644
--- a/ext/filepro/filepro.c
+++ b/ext/filepro/filepro.c
@@ -27,7 +27,7 @@
#include "safe_mode.h"
#include "fopen-wrappers.h"
#include <string.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <windows.h>
#else
#include <sys/param.h>
diff --git a/ext/imap/imap.c b/ext/imap/imap.c
index 545f527882..45be5f3395 100644
--- a/ext/imap/imap.c
+++ b/ext/imap/imap.c
@@ -3441,14 +3441,14 @@ PHP_FUNCTION(imap_mail_compose)
#if !(WIN32|WINNT)
int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *cc, char *bcc, char* rpath)
{
-#if PHP_WIN32
+#ifdef PHP_WIN32
int tsm_err;
#else
FILE *sendmail;
int ret;
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
if (imap_TSendMail(INI_STR("smtp"),&tsm_err,headers,subject,to,message,cc,bcc,rpath) != SUCCESS){
php_error(E_WARNING, GetSMErrorText(tsm_err));
return 0;
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 60870affb1..e1f58732f0 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -30,7 +30,7 @@
#include <dirent.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#define NEEDRDH 1
#include "win32/readdir.h"
#endif
@@ -56,7 +56,7 @@ ps_module ps_mod_files = {
PS_MOD(files)
};
-#if PHP_WIN32
+#ifdef PHP_WIN32
#define DIR_DELIMITER '\\'
#else
#define DIR_DELIMITER '/'
diff --git a/ext/session/session.c b/ext/session/session.c
index 1fa912ddca..89a2447a67 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -19,7 +19,7 @@
#include "php.h"
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/time.h"
#else
#include <sys/time.h>
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 18ddf4ef14..5d4bed6daf 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -25,7 +25,7 @@
#endif
#include "php_snmp.h"
#include <sys/types.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <winsock.h>
#include <errno.h>
#include <process.h>
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 5cd1da504b..0d47ed68e8 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -30,7 +30,7 @@
#else
#include <strings.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/unistd.h"
#endif
#include "zend_globals.h"
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index f8167cc45f..3e70b22f5d 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -42,7 +42,7 @@
#include <locale.h>
#endif
#include "safe_mode.h"
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/unistd.h"
#endif
#include "zend_globals.h"
@@ -194,7 +194,7 @@ function_entry basic_functions[] = {
PHP_FE(gethostbyaddr, NULL)
PHP_FE(gethostbyname, NULL)
PHP_FE(gethostbynamel, NULL)
-#if !(PHP_WIN32)||HAVE_BINDLIB
+#if !defined(PHP_WIN32)||HAVE_BINDLIB
PHP_FE(checkdnsrr, NULL)
PHP_FE(getmxrr, second_and_third_args_force_ref)
#endif
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 6ce59564bb..a77dabab8f 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -107,7 +107,7 @@ PHP_FUNCTION(get_loaded_extensions);
PHP_FUNCTION(extension_loaded);
PHP_FUNCTION(get_extension_funcs);
-#if PHP_WIN32
+#ifdef PHP_WIN32
typedef unsigned int php_stat_len;
#else
typedef int php_stat_len;
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index fa217796dd..d76ba28580 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -41,7 +41,7 @@
#include <strings.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <process.h>
extern char *crypt(char *__key,char *__salt);
#endif
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 88d78c983f..11179e7f73 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -36,7 +36,7 @@
#include <errno.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#define NEEDRDH 1
#include "win32/readdir.h"
#endif
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index a315b3663a..2d6431b47c 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -33,7 +33,7 @@
#else
#include <strings.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/param.h"
#include "win32/winutil.h"
#else
@@ -113,7 +113,7 @@ void php_dl(pval *file,int type,pval *return_value)
} else {
error_type = E_CORE_ERROR;
}
-#if PHP_WIN32
+#ifdef PHP_WIN32
php_error(error_type,"Unable to load dynamic library '%s'<br>\n%s",libpath,php_win_err());
#else
php_error(error_type,"Unable to load dynamic library '%s' - %s",libpath,dlerror());
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 359abef34d..c06c017ed8 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -22,7 +22,7 @@
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#if HAVE_BINDLIB
#ifndef WINNT
#define WINNT 1
@@ -158,7 +158,7 @@ char *php_gethostbyname(char *name)
return estrdup(inet_ntoa(in));
}
-#if !(PHP_WIN32)||HAVE_BINDLIB
+#if !defined(PHP_WIN32)||HAVE_BINDLIB
/* {{{ proto int checkdnsrr(string host [, string type])
Check DNS records corresponding to a given Internet host name or IP address */
diff --git a/ext/standard/dns.h b/ext/standard/dns.h
index 1dcd9ac4d3..1e5b755bd8 100644
--- a/ext/standard/dns.h
+++ b/ext/standard/dns.h
@@ -37,7 +37,7 @@
PHP_FUNCTION(gethostbyaddr);
PHP_FUNCTION(gethostbyname);
PHP_FUNCTION(gethostbynamel);
-#if !(PHP_WIN32)||(HAVE_BINDLIB)
+#if !defined(PHP_WIN32)||(HAVE_BINDLIB)
PHP_FUNCTION(checkdnsrr);
PHP_FUNCTION(getmxrr);
#endif
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 10aff1de45..f12e3dd557 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -86,7 +86,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
tmp = php_escape_shell_cmd(d);
efree(d);
d = tmp;
-#if PHP_WIN32
+#ifdef PHP_WIN32
fp = popen(d, "rb");
#else
fp = popen(d, "r");
@@ -98,7 +98,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
return -1;
}
} else { /* not safe_mode */
-#if PHP_WIN32
+#ifdef PHP_WIN32
fp = popen(cmd, "rb");
#else
fp = popen(cmd, "r");
@@ -363,7 +363,7 @@ PHP_FUNCTION(shell_exec)
}
convert_to_string_ex(cmd);
-#if PHP_WIN32
+#ifdef PHP_WIN32
if ((in=popen((*cmd)->value.str.val,"rt"))==NULL) {
#else
if ((in=popen((*cmd)->value.str.val,"r"))==NULL) {
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 7fdc9c7a01..375ced7381 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -34,7 +34,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <windows.h>
#include <winsock.h>
#define O_RDONLY _O_RDONLY
@@ -49,7 +49,7 @@
#include "php_string.h"
#include "file.h"
#if HAVE_PWD_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/pwd.h"
#else
#include <pwd.h>
@@ -58,7 +58,7 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <winsock.h>
#else
#include <netinet/in.h>
@@ -832,7 +832,7 @@ PHPAPI int php_set_sock_blocking(int socketd, int block)
int flags;
int myflag = 0;
-#if PHP_WIN32
+#ifdef PHP_WIN32
/* with ioctlsocket, a non-zero sets nonblocking, a zero sets blocking */
flags = block;
if (ioctlsocket(socketd,FIONBIO,&flags)==SOCKET_ERROR){
@@ -1525,7 +1525,7 @@ PHP_FUNCTION(copy)
RETURN_FALSE;
}
-#if PHP_WIN32
+#ifdef PHP_WIN32
if ((fd_s=open((*source)->value.str.val,O_RDONLY|_O_BINARY))==-1) {
#else
if ((fd_s=open((*source)->value.str.val,O_RDONLY))==-1) {
@@ -1533,7 +1533,7 @@ PHP_FUNCTION(copy)
php_error(E_WARNING,"Unable to open '%s' for reading: %s",(*source)->value.str.val,strerror(errno));
RETURN_FALSE;
}
-#if PHP_WIN32
+#ifdef PHP_WIN32
if ((fd_t=open((*target)->value.str.val,_O_WRONLY|_O_CREAT|_O_TRUNC|_O_BINARY,_S_IREAD|_S_IWRITE))==-1){
#else
if ((fd_t=creat((*target)->value.str.val,0777))==-1) {
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index e10ba6f7e2..dbbf472993 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -46,7 +46,7 @@
#endif
#if HAVE_PWD_H
-# if PHP_WIN32
+# ifdef PHP_WIN32
# include "win32/pwd.h"
# else
# include <pwd.h>
@@ -54,7 +54,7 @@
#endif
#if HAVE_GRP_H
-# if PHP_WIN32
+# ifdef PHP_WIN32
# include "win32/grp.h"
# else
# include <grp.h>
@@ -62,7 +62,7 @@
#endif
#if HAVE_UTIME
-# if PHP_WIN32
+# ifdef PHP_WIN32
# include <sys/utime.h>
# else
# include <utime.h>
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c
index 4328f3c6c1..eb52d41c41 100644
--- a/ext/standard/flock_compat.c
+++ b/ext/standard/flock_compat.c
@@ -28,7 +28,7 @@
#include <fcntl.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <windows.h>
#include <io.h>
#endif
@@ -64,7 +64,7 @@ int flock(int fd, int operation)
return ret;
}
-#elif PHP_WIN32
+#elif defined(PHP_WIN32)
/*
* Program: Unix compatibility routines
*
@@ -138,7 +138,7 @@ int flock(int fd, int operation)
/* Under Win32 MT library, errno is not a variable but a function call,
* which cannot be assigned to.
*/
-#if !(PHP_WIN32)
+#if !defined(PHP_WIN32)
errno = EINVAL; /* bad call */
#endif
return -1;
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h
index bf927c4ae1..002c046069 100644
--- a/ext/standard/flock_compat.h
+++ b/ext/standard/flock_compat.h
@@ -9,10 +9,10 @@
int flock(int fd, int operation);
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
# define fsync _commit
# define ftruncate chsize
-#endif /* PHP_WIN32 */
+#endif /* defined(PHP_WIN32) */
#if !HAVE_INET_ATON
#if HAVE_NETINET_IN_H
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 4e01400dd8..fc1458b5f6 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -43,14 +43,14 @@
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <winsock.h>
#else
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#undef AF_UNIX
#endif
#if defined(AF_UNIX)
@@ -89,7 +89,7 @@ extern int le_fp;
#define SEARCHCR() \
p = memchr(READPTR(sock), '\n', MIN(TOREAD(sock), maxlen));
-#if PHP_WIN32
+#ifdef PHP_WIN32
#define EWOULDBLOCK WSAEWOULDBLOCK
#else
#include "build-defs.h"
@@ -158,7 +158,7 @@ PHPAPI int connect_nonb(int sockfd,
struct timeval *timeout)
{
/* probably won't work on Win32, someone else might try it (read: fix it ;) */
-#if !PHP_WIN32 && (defined(O_NONBLOCK) || defined(O_NDELAY))
+#if !defined(PHP_WIN32) && (defined(O_NONBLOCK) || defined(O_NDELAY))
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
@@ -216,7 +216,7 @@ PHPAPI int connect_nonb(int sockfd,
ret = -1;
}
return ret;
-#else /* !PHP_WIN32 && ... */
+#else /* !defined(PHP_WIN32) && ... */
return connect(sockfd, addr, addrlen);
#endif
}
@@ -483,7 +483,7 @@ int php_sockdestroy(int socket)
return ret;
}
-#if !PHP_WIN32
+#if !defined(PHP_WIN32)
#undef closesocket
#define closesocket close
#endif
diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h
index 80d740c9fe..775f544b1e 100644
--- a/ext/standard/fsock.h
+++ b/ext/standard/fsock.h
@@ -34,7 +34,7 @@
#ifndef _FSOCK_H
#define _FSOCK_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
# ifndef WINNT
# define WINNT 1
# endif
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 2d67134096..f4058636d3 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -23,7 +23,7 @@
#include "ext/standard/head.h"
#include "info.h"
#include "SAPI.h"
-#if !PHP_WIN32
+#if !defined(PHP_WIN32)
#include "build-defs.h"
#endif
#include "zend_globals.h" /* needs ELS */
@@ -108,7 +108,7 @@ PHPAPI void php_print_info(int flag)
char **env,*tmp1,*tmp2;
char *php_uname;
int expose_php = INI_INT("expose_php");
-#if PHP_WIN32
+#ifdef PHP_WIN32
char php_windows_uname[256];
DWORD dwBuild=0;
DWORD dwVersion = GetVersion();
@@ -120,7 +120,7 @@ PHPAPI void php_print_info(int flag)
if (flag & PHP_INFO_GENERAL) {
-#if PHP_WIN32
+#ifdef PHP_WIN32
// Get build numbers for Windows NT or Win95
if (dwVersion < 0x80000000){
dwBuild = (DWORD)(HIWORD(dwVersion));
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index 48d4b7f75f..76d7168ca3 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -29,7 +29,7 @@ int lcg_globals_id;
static php_lcg_globals lcg_globals;
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <process.h>
#endif
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 6e7e0da855..ad6e8e1b33 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -29,14 +29,14 @@
#include <sys/stat.h>
#include <string.h>
#if HAVE_PWD_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/pwd.h"
#else
#include <pwd.h>
#endif
#endif
#if HAVE_GRP_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/grp.h"
#else
#include <grp.h>
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index ebb20bf660..18d9a68b83 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -22,14 +22,14 @@
#include <ctype.h>
#include <stdio.h>
#include "php.h"
-#if !PHP_WIN32
+#if !defined(PHP_WIN32)
#include "build-defs.h"
#endif
#include "php_mail.h"
#include "php_ini.h"
#if HAVE_SENDMAIL
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/sendmail.h"
#endif
@@ -102,7 +102,7 @@ PHP_FUNCTION(mail)
int php_mail(char *to, char *subject, char *message, char *headers)
{
-#if PHP_WIN32
+#ifdef PHP_WIN32
int tsm_err;
#else
FILE *sendmail;
@@ -110,7 +110,7 @@ int php_mail(char *to, char *subject, char *message, char *headers)
char *sendmail_path = INI_STR("sendmail_path");
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
if (TSendMail(INI_STR("SMTP"), &tsm_err, headers, subject, to, message) != SUCCESS){
php_error(E_WARNING, GetSMErrorText(tsm_err));
return 0;
@@ -144,7 +144,7 @@ int php_mail(char *to, char *subject, char *message, char *headers)
PHP_MINFO_FUNCTION(mail)
{
-#if PHP_WIN32
+#ifdef PHP_WIN32
PUTS("Internal Sendmail support for Windows 4");
#else
php_printf("Path to sendmail: <tt>%s</tt>", INI_STR("sendmail_path"));
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 5b84070abb..dad5ca8d0b 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -31,7 +31,7 @@
#include <stdio.h>
#ifdef HAVE_GETTIMEOFDAY
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/time.h"
#else
#include <sys/time.h>
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 230477216b..b10988fafe 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -25,7 +25,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <windows.h>
#include <winsock.h>
#define O_RDONLY _O_RDONLY
@@ -38,7 +38,7 @@
#include "php_string.h"
#include "pack.h"
#if HAVE_PWD_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/pwd.h"
#else
#include <pwd.h>
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index d232b3f086..c0c7daf429 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#if HAVE_PWD_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/pwd.h"
#else
#include <pwd.h>
@@ -34,7 +34,7 @@
#include <unistd.h>
#endif
#include <sys/stat.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <process.h>
#endif
diff --git a/ext/standard/parsedate.y b/ext/standard/parsedate.y
index ff1b270350..819af8235d 100644
--- a/ext/standard/parsedate.y
+++ b/ext/standard/parsedate.y
@@ -21,7 +21,7 @@
#include "php.h"
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <malloc.h>
#endif
@@ -36,7 +36,7 @@
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
# include "win32/time.h"
#endif
diff --git a/ext/standard/string.c b/ext/standard/string.c
index a866d9c5ad..9a3dacc7a9 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -471,14 +471,14 @@ PHP_FUNCTION(basename)
ret = estrdup((*str)->value.str.val);
c = ret + (*str)->value.str.len -1;
while (*c == '/'
-#if PHP_WIN32
+#ifdef PHP_WIN32
|| *c == '\\'
#endif
)
c--;
*(c + 1) = '\0';
if ((c = strrchr(ret, '/'))
-#if PHP_WIN32
+#ifdef PHP_WIN32
|| (c = strrchr(ret, '\\'))
#endif
) {
@@ -495,14 +495,14 @@ PHPAPI void php_dirname(char *str, int len) {
c = str + len - 1;
while (*c == '/'
-#if PHP_WIN32
+#ifdef PHP_WIN32
|| *c == '\\'
#endif
)
c--; /* strip trailing slashes */
*(c + 1) = '\0';
if ((c = strrchr(str, '/'))
-#if PHP_WIN32
+#ifdef PHP_WIN32
|| (c = strrchr(str, '\\'))
#endif
)
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index de25a5ecce..343ed2114d 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -26,7 +26,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/syslog.h"
#else
#include <syslog.h>
@@ -77,7 +77,7 @@ PHP_MINIT_FUNCTION(syslog)
/* AIX doesn't have LOG_AUTHPRIV */
REGISTER_LONG_CONSTANT("LOG_AUTHPRIV", LOG_AUTHPRIV, CONST_CS | CONST_PERSISTENT);
#endif
-#if !PHP_WIN32
+#if !defined(PHP_WIN32)
REGISTER_LONG_CONSTANT("LOG_LOCAL0", LOG_LOCAL0, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LOG_LOCAL1", LOG_LOCAL1, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LOG_LOCAL2", LOG_LOCAL2, CONST_CS | CONST_PERSISTENT);
@@ -160,7 +160,7 @@ static void start_syslog(void)
/* AIX doesn't have LOG_AUTHPRIV */
SET_VAR_LONG("LOG_AUTHPRIV", LOG_AUTHPRIV);
#endif
-#if !PHP_WIN32
+#if !defined(PHP_WIN32)
SET_VAR_LONG("LOG_LOCAL0", LOG_LOCAL0);
SET_VAR_LONG("LOG_LOCAL1", LOG_LOCAL1);
SET_VAR_LONG("LOG_LOCAL2", LOG_LOCAL2);
diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c
index 9e4200ab74..30ab4473ec 100644
--- a/ext/standard/uniqid.c
+++ b/ext/standard/uniqid.c
@@ -29,7 +29,7 @@
#include <errno.h>
#include <stdio.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/time.h"
#else
#include <sys/time.h>
@@ -64,7 +64,7 @@ PHP_FUNCTION(uniqid)
php_error(E_WARNING, "The prefix to uniqid should not be more than 114 characters.");
return;
}
-#if HAVE_USLEEP && !(PHP_WIN32)
+#if HAVE_USLEEP && !defined(PHP_WIN32)
if (!MORE_ENTROPY) {
usleep(1);
}
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 1b8b39e23a..120aaa8285 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include <windows.h>
#include <winsock.h>
#define O_RDONLY _O_RDONLY
@@ -42,7 +42,7 @@
#include "php_zlib.h"
#include "fopen-wrappers.h"
#if HAVE_PWD_H
-#if PHP_WIN32
+#ifdef PHP_WIN32
#include "win32/pwd.h"
#else
#include <pwd.h>
@@ -50,7 +50,7 @@
#endif
#include "snprintf.h"
#if HAVE_ZLIB
-#if defined(HAVE_UNISTD_H) && PHP_WIN32
+#if defined(HAVE_UNISTD_H) && defined(PHP_WIN32)
#undef HAVE_UNISTD_H
#endif
@@ -197,7 +197,7 @@ static gzFile *php_gzopen_with_path(char *filename, char *mode, char *path, char
}
/* Absolute path open - prepend document_root in safe mode */
-#if PHP_WIN32
+#ifdef PHP_WIN32
if ((*filename == '\\')||(*filename == '/')||(filename[1] == ':')) {
#else
if (*filename == '/') {
@@ -240,7 +240,7 @@ static gzFile *php_gzopen_with_path(char *filename, char *mode, char *path, char
ptr = pathbuf;
while (ptr && *ptr) {
-#if PHP_WIN32
+#ifdef PHP_WIN32
end = strchr(ptr, ';');
#else
end = strchr(ptr, ':');