cvs: /php4 SAPI.c SAPI.h configuration-parser.y fopen-wrappers.c fopen-wrappers.h main.c mergesort.c php.h php_realpath.c /php4/dl/snmp snmp.c
/php4/ext/filepro filepro.c /php4/ext/imap imap.c /php4/ext/session mod_files.c session.c /php4/ext/snmp snmp.c /php4/ext/standard array.c
basic_functions.c basic_functions.h crypt.c dir.c dl.c dns.c dns.h exec.c file.c filestat.c flock_compat.c flock_compat.h fsock.c fsock.h info.c lcg.c
link.c mail.c microtime.c pack.c pageinfo.c parsedate.y string.c syslog.c uniqid.c /php4/ext/zlib zlib.c /php4/sapi/cgi cgi_main.c

From: Date: Fri, 11 Feb 2000 15:59:31 +0000
Subject: cvs: /php4 SAPI.c SAPI.h configuration-parser.y fopen-wrappers.c fopen-wrappers.h main.c mergesort.c php.h php_realpath.c /php4/dl/snmp snmp.c
/php4/ext/filepro filepro.c /php4/ext/imap imap.c /php4/ext/session mod_files.c session.c /php4/ext/snmp snmp.c /php4/ext/standard array.c
basic_functions.c basic_functions.h crypt.c dir.c dl.c dns.c dns.h exec.c file.c filestat.c flock_compat.c flock_compat.h fsock.c fsock.h info.c lcg.c
link.c mail.c microtime.c pack.c pageinfo.c parsedate.y string.c syslog.c uniqid.c /php4/ext/zlib zlib.c /php4/sapi/cgi cgi_main.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10116@lists.php.net to get a copy of this message
zeev Fri Feb 11 07:59:31 2000 EDT Modified files: /php4 SAPI.c SAPI.h configuration-parser.y fopen-wrappers.c fopen-wrappers.h main.c mergesort.c php.h php_realpath.c /php4/dl/snmp snmp.c /php4/ext/filepro filepro.c /php4/ext/imap imap.c /php4/ext/session mod_files.c session.c /php4/ext/snmp snmp.c /php4/ext/standard array.c basic_functions.c basic_functions.h crypt.c dir.c dl.c dns.c dns.h exec.c file.c filestat.c flock_compat.c flock_compat.h fsock.c fsock.h info.c lcg.c link.c mail.c microtime.c pack.c pageinfo.c parsedate.y string.c syslog.c uniqid.c /php4/ext/zlib zlib.c /php4/sapi/cgi cgi_main.c Log: Fine tune Andi's patch Index: php4/SAPI.c diff -u php4/SAPI.c:1.51 php4/SAPI.c:1.52 --- php4/SAPI.c:1.51 Thu Feb 10 12:13:08 2000 +++ php4/SAPI.c Fri Feb 11 07:59:26 2000 @@ -29,7 +29,7 @@ #include "rfc1867.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 #define STRCASECMP stricmp #else #define STRCASECMP strcasecmp Index: php4/SAPI.h diff -u php4/SAPI.h:1.36 php4/SAPI.h:1.37 --- php4/SAPI.h:1.36 Thu Feb 10 12:13:08 2000 +++ php4/SAPI.h Fri Feb 11 07:59:26 2000 @@ -27,7 +27,7 @@ #define SAPI_POST_BLOCK_SIZE 4000 -#if PHP_WIN32 +#ifdef PHP_WIN32 # ifdef SAPI_EXPORTS # define SAPI_API __declspec(dllexport) # else Index: php4/configuration-parser.y diff -u php4/configuration-parser.y:1.31 php4/configuration-parser.y:1.32 --- php4/configuration-parser.y:1.31 Thu Feb 10 09:14:05 2000 +++ php4/configuration-parser.y Fri Feb 11 07:59:26 2000 @@ -19,7 +19,7 @@ -/* $Id: configuration-parser.y,v 1.31 2000/02/10 17:14:05 andi Exp $ */ +/* $Id: configuration-parser.y,v 1.32 2000/02/11 15:59:26 zeev Exp $ */ #define DEBUG_CFG_PARSER 0 #include "php.h" @@ -161,7 +161,7 @@ if (!env_location) { env_location=""; } -#if PHP_WIN32 +#ifdef PHP_WIN32 { if (php_ini_path) { default_location = php_ini_path; @@ -186,7 +186,7 @@ php_ini_search_path = (char *) malloc(sizeof(".")+strlen(env_location)+strlen(default_location)+2+1); if (!php_ini_path) { -#if PHP_WIN32 +#ifdef PHP_WIN32 sprintf(php_ini_search_path,".;%s;%s",env_location,default_location); #else sprintf(php_ini_search_path,".:%s:%s",env_location,default_location); @@ -206,7 +206,7 @@ PG(open_basedir) = open_basedir; if (!cfgin) { -# if PHP_WIN32 +# ifdef PHP_WIN32 return FAILURE; # else return SUCCESS; /* having no configuration file is ok */ Index: php4/fopen-wrappers.c diff -u php4/fopen-wrappers.c:1.40 php4/fopen-wrappers.c:1.41 --- php4/fopen-wrappers.c:1.40 Fri Feb 11 04:56:53 2000 +++ php4/fopen-wrappers.c Fri Feb 11 07:59:26 2000 @@ -16,7 +16,7 @@ | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.c,v 1.40 2000/02/11 12:56:53 andi Exp $ */ +/* $Id: fopen-wrappers.c,v 1.41 2000/02/11 15:59:26 zeev Exp $ */ #include "php.h" #include "php_globals.h" @@ -29,7 +29,7 @@ #include <sys/stat.h> #include <fcntl.h> -#if PHP_WIN32 +#ifdef PHP_WIN32 #include <windows.h> #include <winsock.h> #define O_RDONLY _O_RDONLY @@ -45,7 +45,7 @@ #include "zend_compile.h" #if HAVE_PWD_H -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "win32/pwd.h" #else #include <pwd.h> @@ -61,7 +61,7 @@ #define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG) #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 #include <winsock.h> #else #include <netinet/in.h> @@ -69,7 +69,7 @@ #include <arpa/inet.h> #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 #undef AF_UNIX #endif @@ -105,7 +105,7 @@ /* Strip filename */ while (( -#if PHP_WIN32 +#ifdef PHP_WIN32 (local_open_basedir[local_open_basedir_pos] != '\\') || #endif (local_open_basedir[local_open_basedir_pos] != '/') @@ -122,7 +122,7 @@ /* Resolve the real path into resolved_name */ if ((php_realpath(path, resolved_name) != NULL) && (php_realpath(local_open_basedir, resolved_basedir) != NULL)) { /* Check the path */ -#if PHP_WIN32 +#ifdef PHP_WIN32 if (strncasecmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) { #else if (strncmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) { @@ -153,7 +153,7 @@ ptr = pathbuf; while (ptr && *ptr) { -#if PHP_WIN32 +#ifdef PHP_WIN32 end = strchr(ptr, ';'); #else end = strchr(ptr, ':'); @@ -338,7 +338,7 @@ return fp; } /* Absolute path open - prepend document_root in safe mode */ -#if PHP_WIN32 +#ifdef PHP_WIN32 if ((*filename == '\\') || (*filename == '/') || (filename[1] == ':')) { #else if (*filename == '/') { @@ -379,7 +379,7 @@ ptr = pathbuf; while (ptr && *ptr) { -#if PHP_WIN32 +#ifdef PHP_WIN32 end = strchr(ptr, ';'); #else end = strchr(ptr, ':'); Index: php4/fopen-wrappers.h diff -u php4/fopen-wrappers.h:1.14 php4/fopen-wrappers.h:1.15 --- php4/fopen-wrappers.h:1.14 Thu Feb 10 09:14:05 2000 +++ php4/fopen-wrappers.h Fri Feb 11 07:59:26 2000 @@ -15,7 +15,7 @@ | Authors: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.h,v 1.14 2000/02/10 17:14:05 andi Exp $ */ +/* $Id: fopen-wrappers.h,v 1.15 2000/02/11 15:59:26 zeev Exp $ */ #ifndef _FOPEN_WRAPPERS_H #define _FOPEN_WRAPPERS_H @@ -26,14 +26,14 @@ #define USE_PATH 1 #define IGNORE_URL 2 /* There's no USE_URL. */ -#if PHP_WIN32 +#ifdef PHP_WIN32 # define IGNORE_URL_WIN 2 #else # define IGNORE_URL_WIN 0 #endif #define ENFORCE_SAFE_MODE 4 -#if PHP_WIN32 +#ifdef PHP_WIN32 # define SOCK_ERR INVALID_SOCKET # define SOCK_CONN_ERR SOCKET_ERROR # define SOCK_RECV_ERR SOCKET_ERROR Index: php4/main.c diff -u php4/main.c:1.202 php4/main.c:1.203 --- php4/main.c:1.202 Fri Feb 11 04:56:53 2000 +++ php4/main.c Fri Feb 11 07:59:26 2000 @@ -19,12 +19,12 @@ */ -/* $Id: main.c,v 1.202 2000/02/11 12:56:53 andi Exp $ */ +/* $Id: main.c,v 1.203 2000/02/11 15:59:26 zeev Exp $ */ #include <stdio.h> #include "php.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "win32/time.h" #include "win32/signal.h" #include <process.h> @@ -51,7 +51,7 @@ #include "ext/standard/php_standard.h" #include "snprintf.h" #include "php_variables.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 #include <io.h> #include <fcntl.h> #include "win32/syslog.h" @@ -453,7 +453,7 @@ static void php_set_timeout(long seconds) { -#if PHP_WIN32 +#ifdef PHP_WIN32 #else # ifdef HAVE_SETITIMER struct itimerval t_r; /* timeout requested */ @@ -471,7 +471,7 @@ static void php_unset_timeout(void) { -#if PHP_WIN32 +#ifdef PHP_WIN32 #else # ifdef HAVE_SETITIMER struct itimerval no_timeout; @@ -591,7 +591,7 @@ snprintf(memory_leak_buf, 512, "Last leak repeated %ld time%s\n", leak_count, (leak_count>1?"s":"")); } -# if PHP_WIN32 +# if defined(PHP_WIN32) OutputDebugString(memory_leak_buf); # else fprintf(stderr, memory_leak_buf); @@ -772,11 +772,11 @@ php_core_globals *core_globals; sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id); #endif -#if (PHP_WIN32) && !(USE_SAPI) +#ifdef PHP_WIN32 WORD wVersionRequested = MAKEWORD(2, 0); WSADATA wsaData; #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 { DWORD dwVersion = GetVersion(); @@ -832,7 +832,7 @@ setlocale(LC_CTYPE, ""); #endif -#if (PHP_WIN32) && !(USE_SAPI) +#ifdef PHP_WIN32 /* start up winsock services */ if (WSAStartup(wVersionRequested, &wsaData) != 0) { php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError()); @@ -897,7 +897,7 @@ /* close down the ini config */ php_config_ini_shutdown(); -#if (PHP_WIN32) +#ifdef PHP_WIN32 /*close winsock */ WSACleanup(); #endif @@ -1102,7 +1102,7 @@ return; } -#if PHP_WIN32 +#ifdef PHP_WIN32 UpdateIniFromRegistry(primary_file->filename); #endif @@ -1129,7 +1129,7 @@ } } -#if PHP_WIN32 +#ifdef PHP_WIN32 /* just so that this symbol gets exported... */ PHPAPI void dummy_indent() { Index: php4/mergesort.c diff -u php4/mergesort.c:1.5 php4/mergesort.c:1.6 --- php4/mergesort.c:1.5 Thu Feb 10 09:14:05 2000 +++ php4/mergesort.c Fri Feb 11 07:59:26 2000 @@ -60,7 +60,7 @@ #include "php.h" -#if (PHP_WIN32) +#ifdef PHP_WIN32 #include <winsock.h> /* Includes definition for u_char */ #endif Index: php4/php.h diff -u php4/php.h:1.61 php4/php.h:1.62 --- php4/php.h:1.61 Thu Feb 10 12:13:08 2000 +++ php4/php.h Fri Feb 11 07:59:26 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.61 2000/02/10 20:13:08 zeev Exp $ */ +/* $Id: php.h,v 1.62 2000/02/11 15:59:26 zeev Exp $ */ #ifndef _PHP_H #define _PHP_H @@ -33,8 +33,6 @@ #include "php_version.h" #include "zend.h" -#define PHP_WIN32 ZEND_WIN32 - /* automake defines PACKAGE and VERSION for Zend too */ #ifdef PACKAGE # undef PACKAGE @@ -59,7 +57,7 @@ */ -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "config.w32.h" #include "win95nt.h" # ifdef PHP_EXPORTS @@ -80,7 +78,7 @@ #define DEBUG ZEND_DEBUG -#if DEBUG || !(defined(__GNUC__)||PHP_WIN32) +#if DEBUG || !(defined(__GNUC__)||defined(PHP_WIN32)) #ifdef inline #undef inline #endif @@ -170,7 +168,7 @@ #endif #if HAVE_PWD_H -# if PHP_WIN32 +# ifdef PHP_WIN32 #include "win32/pwd.h" #include "win32/param.h" # else @@ -242,7 +240,7 @@ /* global variables */ extern pval *data; -#if !(PHP_WIN32) +#if !defined(PHP_WIN32) extern char **environ; #define php_sleep sleep #endif Index: php4/php_realpath.c diff -u php4/php_realpath.c:1.3 php4/php_realpath.c:1.4 --- php4/php_realpath.c:1.3 Thu Feb 10 09:14:05 2000 +++ php4/php_realpath.c Fri Feb 11 07:59:26 2000 @@ -40,7 +40,7 @@ char path_copy[MAXPATHLEN]; /* A work-copy of the path */ char *workpos; /* working position in *path */ -#if !(PHP_WIN32) +#if !defined(PHP_WIN32) char buf[MAXPATHLEN]; /* Buffer for readlink */ int linklength; /* The result from readlink */ #endif @@ -48,7 +48,7 @@ struct stat filestat; /* result from stat */ -#if PHP_WIN32 +#ifdef PHP_WIN32 char *temppos; /* position while counting '.' */ int dotcount; /* number of '.' */ int t; /* counter */ @@ -58,7 +58,7 @@ strcpy(path_copy, path); workpos = path_copy; -#if PHP_WIN32 +#ifdef PHP_WIN32 /* Find out where we start - Windows version */ if ((*workpos == '\\') || (*workpos == '/')) { /* We start at the root of the current drive */ @@ -109,13 +109,13 @@ /* Go to the end, then stop */ while(*workpos != 0) { /* Strip (back)slashes */ -#if PHP_WIN32 +#ifdef PHP_WIN32 while(*workpos == '\\') workpos++; #else while(*workpos == '/') workpos++; #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 /* reset dotcount */ dotcount = 0; @@ -169,7 +169,7 @@ *writepos++ = *workpos++; } *writepos = 0; -#else /* PHP_WIN32 */ +#else /* defined(PHP_WIN32) */ /* Look for .. */ if ((workpos[0] == '.') && (workpos[1] != 0)) { if ((workpos[1] == '.') && ((workpos[2] == '/') || (workpos[2] == 0))) { @@ -247,7 +247,7 @@ *writepos++ = *workpos++; } *writepos = 0; -#endif /* PHP_WIN32 */ +#endif /* defined(PHP_WIN32) */ } /* Check if the resolved path is a directory */ Index: php4/dl/snmp/snmp.c diff -u php4/dl/snmp/snmp.c:1.5 php4/dl/snmp/snmp.c:1.6 --- php4/dl/snmp/snmp.c:1.5 Fri Feb 11 04:56:53 2000 +++ php4/dl/snmp/snmp.c Fri Feb 11 07:59:26 2000 @@ -26,7 +26,7 @@ | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.5 2000/02/11 12:56:53 andi Exp $ */ +/* $Id: snmp.c,v 1.6 2000/02/11 15:59:26 zeev Exp $ */ #ifndef __P #define __P(p) p @@ -39,7 +39,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> Index: php4/ext/filepro/filepro.c diff -u php4/ext/filepro/filepro.c:1.12 php4/ext/filepro/filepro.c:1.13 --- php4/ext/filepro/filepro.c:1.12 Thu Feb 10 14:00:52 2000 +++ php4/ext/filepro/filepro.c Fri Feb 11 07:59:27 2000 @@ -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> Index: php4/ext/imap/imap.c diff -u php4/ext/imap/imap.c:1.34 php4/ext/imap/imap.c:1.35 --- php4/ext/imap/imap.c:1.34 Thu Feb 10 14:00:52 2000 +++ php4/ext/imap/imap.c Fri Feb 11 07:59:27 2000 @@ -21,7 +21,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: imap.c,v 1.34 2000/02/10 22:00:52 andi Exp $ */ +/* $Id: imap.c,v 1.35 2000/02/11 15:59:27 zeev Exp $ */ #define IMAP41 @@ -3441,14 +3441,14 @@ #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; Index: php4/ext/session/mod_files.c diff -u php4/ext/session/mod_files.c:1.25 php4/ext/session/mod_files.c:1.26 --- php4/ext/session/mod_files.c:1.25 Fri Feb 11 05:41:30 2000 +++ php4/ext/session/mod_files.c Fri Feb 11 07:59:28 2000 @@ -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_MOD(files) }; -#if PHP_WIN32 +#ifdef PHP_WIN32 #define DIR_DELIMITER '\\' #else #define DIR_DELIMITER '/' Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.104 php4/ext/session/session.c:1.105 --- php4/ext/session/session.c:1.104 Fri Feb 11 05:41:30 2000 +++ php4/ext/session/session.c Fri Feb 11 07:59:28 2000 @@ -19,7 +19,7 @@ #include "php.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "win32/time.h" #else #include <sys/time.h> Index: php4/ext/snmp/snmp.c diff -u php4/ext/snmp/snmp.c:1.17 php4/ext/snmp/snmp.c:1.18 --- php4/ext/snmp/snmp.c:1.17 Thu Feb 10 14:00:52 2000 +++ php4/ext/snmp/snmp.c Fri Feb 11 07:59:28 2000 @@ -17,7 +17,7 @@ | Steven Lawrance <slawrance@technologist.com> | +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.17 2000/02/10 22:00:52 andi Exp $ */ +/* $Id: snmp.c,v 1.18 2000/02/11 15:59:28 zeev Exp $ */ #include "php.h" #if defined(COMPILE_DL) @@ -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> Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.25 php4/ext/standard/array.c:1.26 --- php4/ext/standard/array.c:1.25 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/array.c Fri Feb 11 07:59:28 2000 @@ -30,7 +30,7 @@ #else #include <strings.h> #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "win32/unistd.h" #endif #include "zend_globals.h" Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.158 php4/ext/standard/basic_functions.c:1.159 --- php4/ext/standard/basic_functions.c:1.158 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/basic_functions.c Fri Feb 11 07:59:28 2000 @@ -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 @@ 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 Index: php4/ext/standard/basic_functions.h diff -u php4/ext/standard/basic_functions.h:1.45 php4/ext/standard/basic_functions.h:1.46 --- php4/ext/standard/basic_functions.h:1.45 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/basic_functions.h Fri Feb 11 07:59:28 2000 @@ -29,7 +29,7 @@ */ -/* $Id: basic_functions.h,v 1.45 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: basic_functions.h,v 1.46 2000/02/11 15:59:28 zeev Exp $ */ #ifndef _BASIC_FUNCTIONS_H #define _BASIC_FUNCTIONS_H @@ -107,7 +107,7 @@ 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; Index: php4/ext/standard/crypt.c diff -u php4/ext/standard/crypt.c:1.17 php4/ext/standard/crypt.c:1.18 --- php4/ext/standard/crypt.c:1.17 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/crypt.c Fri Feb 11 07:59:29 2000 @@ -17,7 +17,7 @@ | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: crypt.c,v 1.17 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: crypt.c,v 1.18 2000/02/11 15:59:29 zeev Exp $ */ #include <stdlib.h> #include "php.h" @@ -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 Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.25 php4/ext/standard/dir.c:1.26 --- php4/ext/standard/dir.c:1.25 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/dir.c Fri Feb 11 07:59:29 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.25 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: dir.c,v 1.26 2000/02/11 15:59:29 zeev Exp $ */ /* {{{ includes/startup/misc */ @@ -36,7 +36,7 @@ #include <errno.h> -#if PHP_WIN32 +#ifdef PHP_WIN32 #define NEEDRDH 1 #include "win32/readdir.h" #endif Index: php4/ext/standard/dl.c diff -u php4/ext/standard/dl.c:1.23 php4/ext/standard/dl.c:1.24 --- php4/ext/standard/dl.c:1.23 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/dl.c Fri Feb 11 07:59:29 2000 @@ -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 @@ } 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()); Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.13 php4/ext/standard/dns.c:1.14 --- php4/ext/standard/dns.c:1.13 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/dns.c Fri Feb 11 07:59:29 2000 @@ -16,13 +16,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.13 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: dns.c,v 1.14 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" #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 @@ 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 */ Index: php4/ext/standard/dns.h diff -u php4/ext/standard/dns.h:1.3 php4/ext/standard/dns.h:1.4 --- php4/ext/standard/dns.h:1.3 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/dns.h Fri Feb 11 07:59:29 2000 @@ -29,7 +29,7 @@ */ -/* $Id: dns.h,v 1.3 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: dns.h,v 1.4 2000/02/11 15:59:29 zeev Exp $ */ #ifndef _DNS_H #define _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 Index: php4/ext/standard/exec.c diff -u php4/ext/standard/exec.c:1.23 php4/ext/standard/exec.c:1.24 --- php4/ext/standard/exec.c:1.23 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/exec.c Fri Feb 11 07:59:29 2000 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.23 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: exec.c,v 1.24 2000/02/11 15:59:29 zeev Exp $ */ #include <stdio.h> #include "php.h" @@ -86,7 +86,7 @@ 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 @@ 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 @@ } 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) { Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.64 php4/ext/standard/file.c:1.65 --- php4/ext/standard/file.c:1.64 Thu Feb 10 13:53:55 2000 +++ php4/ext/standard/file.c Fri Feb 11 07:59:29 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.64 2000/02/10 21:53:55 andi Exp $ */ +/* $Id: file.c,v 1.65 2000/02/11 15:59:29 zeev Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -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 @@ 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 @@ 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_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) { Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.22 php4/ext/standard/filestat.c:1.23 --- php4/ext/standard/filestat.c:1.22 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/filestat.c Fri Feb 11 07:59:29 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.22 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: filestat.c,v 1.23 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" #include "safe_mode.h" @@ -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> Index: php4/ext/standard/flock_compat.c diff -u php4/ext/standard/flock_compat.c:1.5 php4/ext/standard/flock_compat.c:1.6 --- php4/ext/standard/flock_compat.c:1.5 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/flock_compat.c Fri Feb 11 07:59:29 2000 @@ -15,7 +15,7 @@ | Authors: Sascha Schumann <sas@schell.de> | +----------------------------------------------------------------------+ - $Id: flock_compat.c,v 1.5 2000/02/10 21:53:56 andi Exp $ + $Id: flock_compat.c,v 1.6 2000/02/11 15:59:29 zeev Exp $ */ @@ -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 @@ return ret; } -#elif PHP_WIN32 +#elif defined(PHP_WIN32) /* * Program: Unix compatibility routines * @@ -138,7 +138,7 @@ /* 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; Index: php4/ext/standard/flock_compat.h diff -u php4/ext/standard/flock_compat.h:1.4 php4/ext/standard/flock_compat.h:1.5 --- php4/ext/standard/flock_compat.h:1.4 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/flock_compat.h Fri Feb 11 07:59:29 2000 @@ -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 Index: php4/ext/standard/fsock.c diff -u php4/ext/standard/fsock.c:1.45 php4/ext/standard/fsock.c:1.46 --- php4/ext/standard/fsock.c:1.45 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/fsock.c Fri Feb 11 07:59:29 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.45 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: fsock.c,v 1.46 2000/02/11 15:59:29 zeev Exp $ */ /* Synced with php 3.0 revision 1.121 1999-06-18 [ssb] */ /* Synced with php 3.0 revision 1.133 1999-07-21 [sas] */ @@ -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 @@ #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 @@ 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 @@ ret = -1; } return ret; -#else /* !PHP_WIN32 && ... */ +#else /* !defined(PHP_WIN32) && ... */ return connect(sockfd, addr, addrlen); #endif } @@ -483,7 +483,7 @@ return ret; } -#if !PHP_WIN32 +#if !defined(PHP_WIN32) #undef closesocket #define closesocket close #endif Index: php4/ext/standard/fsock.h diff -u php4/ext/standard/fsock.h:1.25 php4/ext/standard/fsock.h:1.26 --- php4/ext/standard/fsock.h:1.25 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/fsock.h Fri Feb 11 07:59:29 2000 @@ -27,14 +27,14 @@ | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: fsock.h,v 1.25 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: fsock.h,v 1.26 2000/02/11 15:59:29 zeev Exp $ */ /* Synced with php 3.0 revision 1.24 1999-06-18 [ssb] */ #ifndef _FSOCK_H #define _FSOCK_H -#if PHP_WIN32 +#ifdef PHP_WIN32 # ifndef WINNT # define WINNT 1 # endif Index: php4/ext/standard/info.c diff -u php4/ext/standard/info.c:1.61 php4/ext/standard/info.c:1.62 --- php4/ext/standard/info.c:1.61 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/info.c Fri Feb 11 07:59:29 2000 @@ -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 @@ 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 @@ 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)); Index: php4/ext/standard/lcg.c diff -u php4/ext/standard/lcg.c:1.7 php4/ext/standard/lcg.c:1.8 --- php4/ext/standard/lcg.c:1.7 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/lcg.c Fri Feb 11 07:59:29 2000 @@ -29,7 +29,7 @@ static php_lcg_globals lcg_globals; #endif -#if PHP_WIN32 +#ifdef PHP_WIN32 #include <process.h> #endif Index: php4/ext/standard/link.c diff -u php4/ext/standard/link.c:1.17 php4/ext/standard/link.c:1.18 --- php4/ext/standard/link.c:1.17 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/link.c Fri Feb 11 07:59:29 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: link.c,v 1.17 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: link.c,v 1.18 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" #include "php_filestat.h" @@ -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> Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.17 php4/ext/standard/mail.c:1.18 --- php4/ext/standard/mail.c:1.17 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/mail.c Fri Feb 11 07:59:29 2000 @@ -16,20 +16,20 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c,v 1.17 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: mail.c,v 1.18 2000/02/11 15:59:29 zeev Exp $ */ #include <stdlib.h> #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 @@ 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 @@ 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 @@ 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")); Index: php4/ext/standard/microtime.c diff -u php4/ext/standard/microtime.c:1.13 php4/ext/standard/microtime.c:1.14 --- php4/ext/standard/microtime.c:1.13 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/microtime.c Fri Feb 11 07:59:29 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.c,v 1.13 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: microtime.c,v 1.14 2000/02/11 15:59:29 zeev Exp $ */ #include <stdlib.h> #ifdef HAVE_UNISTD_H @@ -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> Index: php4/ext/standard/pack.c diff -u php4/ext/standard/pack.c:1.15 php4/ext/standard/pack.c:1.16 --- php4/ext/standard/pack.c:1.15 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/pack.c Fri Feb 11 07:59:29 2000 @@ -15,7 +15,7 @@ | Authors: Chris Schneider <cschneid@relog.ch> | +----------------------------------------------------------------------+ */ -/* $Id: pack.c,v 1.15 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: pack.c,v 1.16 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" @@ -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> Index: php4/ext/standard/pageinfo.c diff -u php4/ext/standard/pageinfo.c:1.15 php4/ext/standard/pageinfo.c:1.16 --- php4/ext/standard/pageinfo.c:1.15 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/pageinfo.c Fri Feb 11 07:59:29 2000 @@ -15,7 +15,7 @@ | Authors: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: pageinfo.c,v 1.15 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: pageinfo.c,v 1.16 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" #include "pageinfo.h" @@ -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 Index: php4/ext/standard/parsedate.y diff -u php4/ext/standard/parsedate.y:1.16 php4/ext/standard/parsedate.y:1.17 --- php4/ext/standard/parsedate.y:1.16 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/parsedate.y Fri Feb 11 07:59:29 2000 @@ -1,5 +1,5 @@ %{ -/* $Revision: 1.16 $ +/* $Revision: 1.17 $ ** ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by @@ -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 Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.95 php4/ext/standard/string.c:1.96 --- php4/ext/standard/string.c:1.95 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/string.c Fri Feb 11 07:59:29 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.95 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: string.c,v 1.96 2000/02/11 15:59:29 zeev Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -471,14 +471,14 @@ 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 @@ 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 ) Index: php4/ext/standard/syslog.c diff -u php4/ext/standard/syslog.c:1.14 php4/ext/standard/syslog.c:1.15 --- php4/ext/standard/syslog.c:1.14 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/syslog.c Fri Feb 11 07:59:29 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: syslog.c,v 1.14 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: syslog.c,v 1.15 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" #include "php_ini.h" @@ -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 @@ /* 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 @@ /* 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); Index: php4/ext/standard/uniqid.c diff -u php4/ext/standard/uniqid.c:1.16 php4/ext/standard/uniqid.c:1.17 --- php4/ext/standard/uniqid.c:1.16 Thu Feb 10 13:53:56 2000 +++ php4/ext/standard/uniqid.c Fri Feb 11 07:59:29 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uniqid.c,v 1.16 2000/02/10 21:53:56 andi Exp $ */ +/* $Id: uniqid.c,v 1.17 2000/02/11 15:59:29 zeev Exp $ */ #include "php.h" @@ -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_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); } Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.32 php4/ext/zlib/zlib.c:1.33 --- php4/ext/zlib/zlib.c:1.32 Thu Feb 10 13:55:30 2000 +++ php4/ext/zlib/zlib.c Fri Feb 11 07:59:30 2000 @@ -16,7 +16,7 @@ | Stefan Röhrich <sr@linux.de> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.32 2000/02/10 21:55:30 andi Exp $ */ +/* $Id: zlib.c,v 1.33 2000/02/11 15:59:30 zeev Exp $ */ #define IS_EXT_MODULE #include "php.h" @@ -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 @@ } /* 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 @@ ptr = pathbuf; while (ptr && *ptr) { -#if PHP_WIN32 +#ifdef PHP_WIN32 end = strchr(ptr, ';'); #else end = strchr(ptr, ':'); Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.28 php4/sapi/cgi/cgi_main.c:1.29 --- php4/sapi/cgi/cgi_main.c:1.28 Fri Feb 11 04:56:54 2000 +++ php4/sapi/cgi/cgi_main.c Fri Feb 11 07:59:30 2000 @@ -27,7 +27,7 @@ #include <stdio.h> #include "php.h" -#if PHP_WIN32 +#ifdef PHP_WIN32 #include "win32/time.h" #include "win32/signal.h" #include <process.h> @@ -249,7 +249,7 @@ if (!script_filename) { script_filename = SG(request_info).argv0; } -#if PHP_WIN32 +#ifdef PHP_WIN32 /* FIXME WHEN APACHE NT IS FIXED */ /* a hack for apache nt because it does not appear to set argv[1] and sets script filename to php.exe thus makes us parse php.exe instead of file.php

« previous php.version4 (#10116) next »