summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/cpdf/cpdf.c2
-rw-r--r--ext/db/db.c2
-rw-r--r--ext/gd/gd.c2
-rw-r--r--ext/hyperwave/hg_comm.c30
-rw-r--r--ext/hyperwave/hg_comm.h2
-rw-r--r--ext/hyperwave/hw.c6
-rw-r--r--ext/odbc/php_odbc.c4
-rw-r--r--ext/pdf/pdf.c2
-rw-r--r--ext/xml/xml.c2
-rw-r--r--sapi/apache/php_apache.c2
10 files changed, 27 insertions, 27 deletions
diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c
index 4306e563a9..2371d57cd0 100644
--- a/ext/cpdf/cpdf.c
+++ b/ext/cpdf/cpdf.c
@@ -50,7 +50,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#if WIN32|WINNT
+#ifdef PHP_WIN32
# include <io.h>
# include <fcntl.h>
#endif
diff --git a/ext/db/db.c b/ext/db/db.c
index 5085012465..2debf7f6ca 100644
--- a/ext/db/db.c
+++ b/ext/db/db.c
@@ -42,7 +42,7 @@
#ifdef PHP_31
#include "os/nt/flock.h"
#else
-#if WIN32|WINNT
+#ifdef PHP_WIN32
#include "win32/flock.h"
#else
#include <sys/file.h>
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 7ac96b6aff..be578ffd0e 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -37,7 +37,7 @@
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
-#if WIN32|WINNT
+#ifdef PHP_WIN32
# include <io.h>
# include <fcntl.h>
#endif
diff --git a/ext/hyperwave/hg_comm.c b/ext/hyperwave/hg_comm.c
index c0e2de07e1..e5868883ec 100644
--- a/ext/hyperwave/hg_comm.c
+++ b/ext/hyperwave/hg_comm.c
@@ -30,7 +30,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
-#if WIN32|WINNT
+#ifdef PHP_WIN32
# include <winsock2.h>
# define EWOULDBLOCK WSAEWOULDBLOCK
# define ETIMEDOUT WSAETIMEDOUT
@@ -873,7 +873,7 @@ static int fnCOpenDataCon(int sockfd, int *port)
/*
** Make sure that address may be reused
*/
-#if defined(SUN) || (WIN32|WINNT)
+#if defined(SUN) || defined(PHP_WIN32)
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&option, sizeof(option));
#else
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option));
@@ -920,7 +920,7 @@ static int fnCOpenDataCon(int sockfd, int *port)
* dec@essw.com
*
*====================================================================*/
-#if WIN32|WINNT
+#ifdef PHP_WIN32
#include <time.h>
#else
#include <sys/fcntl.h>
@@ -930,13 +930,13 @@ static int fnCOpenDataCon(int sockfd, int *port)
#include <errno.h>
#include <signal.h>
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
static sigset_t newmask, oldmask, zeromask;
#endif
static int set_noblock(int fd)
{
-#if WIN32|WINNT
+#ifdef PHP_WIN32
u_long argp=1;
return ioctlsocket (fd, FIONBIO , &argp);
@@ -958,7 +958,7 @@ int write_to(int fd, void *buffer, int n, int timeout)
int nrem, nw=0;
char *bptr;
int error=0;
-#if defined(SYSV) || (WIN32|WINNT)
+#if defined(SYSV) || defined(PHP_WIN32)
int width = 20;
#else
int width = getdtablesize();
@@ -967,7 +967,7 @@ int write_to(int fd, void *buffer, int n, int timeout)
struct timeval select_timeout;
select_timeout.tv_sec = timeout;
-#if WIN32|WINNT
+#ifdef PHP_WIN32
select_timeout.tv_usec = 0;
#else /* is this just a typo? */
select_timeout.tv_usec = 0.;
@@ -1010,7 +1010,7 @@ int write_to(int fd, void *buffer, int n, int timeout)
bptr += nw;
}
}
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) return -1;
#endif
if( ! error ) {
@@ -1029,7 +1029,7 @@ int read_to(int fd, char *buffer, int n, int timeout)
char *bptr;
int error=0;
-#if defined(SYSV) || (WIN32|WINNT)
+#if defined(SYSV) || defined(PHP_WIN32)
int width = 20;
#else
int width = getdtablesize();
@@ -1038,7 +1038,7 @@ int read_to(int fd, char *buffer, int n, int timeout)
struct timeval select_timeout;
select_timeout.tv_sec = timeout;
-#if WIN32|WINNT
+#ifdef PHP_WIN32
select_timeout.tv_usec = 0;
#else
select_timeout.tv_usec = 0.;
@@ -1088,7 +1088,7 @@ int read_to(int fd, char *buffer, int n, int timeout)
}
}
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) return -1;
#endif
if( ! error )
@@ -1142,7 +1142,7 @@ int open_hg_connection(char *server_name, int port)
return(-3);
}
-#if defined(SUN) || (WIN32|WINNT)
+#if defined(SUN) || defined(PHP_WIN32)
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&option, sizeof(option));
#else
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option));
@@ -1153,7 +1153,7 @@ int open_hg_connection(char *server_name, int port)
return(-4);
}
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
if ( (sock_flags = fcntl(sockfd, F_GETFL, 0)) == -1 )
#endif
@@ -1263,7 +1263,7 @@ int initialize_hg_connection(int sockfd, int *do_swap, int *version, char **user
static int set_nonblocking(int fd)
{
-#if WIN32|WINNT
+#ifdef PHP_WIN32
unsigned int argp=0;
/* if ( sock_flags == -1 )
@@ -1283,7 +1283,7 @@ static int set_nonblocking(int fd)
static int set_blocking(int fd)
{
-#if WIN32|WINNT
+#ifdef PHP_WIN32
unsigned int argp=1;
if(ioctlsocket (fd, FIONBIO , &argp) == -1)
diff --git a/ext/hyperwave/hg_comm.h b/ext/hyperwave/hg_comm.h
index 258ff4d51f..922740a719 100644
--- a/ext/hyperwave/hg_comm.h
+++ b/ext/hyperwave/hg_comm.h
@@ -97,7 +97,7 @@
#define COLLECTION 1
-#if WIN32|WINNT
+#ifdef PHP_WIN32
# define SOCK_ERR INVALID_SOCKET
# define SOCK_CONN_ERR SOCKET_ERROR
# define HWSOCK_FCLOSE(s) closesocket(s)
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c
index 9957552f0f..254aaa80d6 100644
--- a/ext/hyperwave/hw.c
+++ b/ext/hyperwave/hw.c
@@ -31,7 +31,7 @@
#include "ext/standard/info.h"
#include "SAPI.h"
-#if WIN32|WINNT
+#ifdef PHP_WIN32
#include <winsock.h>
#else
#include "build-defs.h"
@@ -2060,7 +2060,7 @@ PHP_FUNCTION(hw_getcgi) {
string. It should contain any enviroment variable a cgi script
requires.
*/
-#if (WIN32|WINNT)
+#ifdef PHP_WIN32
snprintf(cgi_env_str, BUFFERLEN, "CGI_REQUEST_METHOD=%s\nCGI_PATH_INFO=%s\nCGI_QUERY_STRING=%s",
getenv("REQUEST_METHOD"),
getenv("PATH_INFO"),
@@ -2356,7 +2356,7 @@ PHP_FUNCTION(hw_pipecgi) {
char *attributes = NULL;
int count;
-#if (WIN32|WINNT)
+#ifdef PHP_WIN32
snprintf(cgi_env_str, BUFFERLEN, "CGI_REQUEST_METHOD=%s\nCGI_PATH_INFO=%s\nCGI_QUERY_STRING=%s",
getenv("REQUEST_METHOD"),
getenv("PATH_INFO"),
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 908292cba2..fef30bf896 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -42,7 +42,7 @@
#include "ext/standard/head.h"
#include "php_ini.h"
-#if WIN32|WINNT
+#ifdef PHP_WIN32
#include <winsock.h>
#define ODBC_TYPE "Win32"
@@ -444,7 +444,7 @@ PHP_MINFO_FUNCTION(odbc)
sprintf(buf, "%ld", ODBCG(num_links));
php_info_print_table_row(2, "Active Links", buf);
php_info_print_table_row(2, "ODBC library", PHP_ODBC_TYPE);
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
php_info_print_table_row(2, "ODBC_INCLUDE", PHP_ODBC_INCLUDE);
php_info_print_table_row(2, "ODBC_LFLAGS", PHP_ODBC_LFLAGS);
php_info_print_table_row(2, "ODBC_LIBS", PHP_ODBC_LIBS);
diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c
index d461b1d68b..9210e9a3fa 100644
--- a/ext/pdf/pdf.c
+++ b/ext/pdf/pdf.c
@@ -52,7 +52,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#if WIN32|WINNT
+#ifdef PHP_WIN32
# include <io.h>
# include <fcntl.h>
#endif
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index d1625d8626..73aac7f4d2 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -29,7 +29,7 @@
#if HAVE_LIBEXPAT
-# if !(WIN32|WINNT)
+#ifndef PHP_WIN32
# include "build-defs.h"
# endif
# include "ext/standard/head.h"
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c
index 0250a38397..b6ea226274 100644
--- a/sapi/apache/php_apache.c
+++ b/sapi/apache/php_apache.c
@@ -179,7 +179,7 @@ PHP_MINFO_FUNCTION(apache)
serv = ((request_rec *) SG(server_context))->server;
-#if WIN32|WINNT
+#ifdef PHP_WIN32
PUTS("Apache for Windows 95/NT<br>");
php_info_print_table_start();
#else