cvs: /php4 SAPI.c SAPI.h configuration-parser.y fopen-wrappers.c fopen-wrappers.h main.c mergesort.c php.h php_realpath.c request_info.c

From: Date: Thu, 10 Feb 2000 17:14:36 +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 request_info.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10040@lists.php.net to get a copy of this message
andi Thu Feb 10 09:14:36 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 request_info.c Log: - Introduce PHP_WIN32 Index: php4/SAPI.c diff -u php4/SAPI.c:1.43 php4/SAPI.c:1.44 --- php4/SAPI.c:1.43 Thu Feb 10 08:44:58 2000 +++ php4/SAPI.c Thu Feb 10 09:14:05 2000 @@ -28,7 +28,7 @@ #include "rfc1867.h" -#if WIN32||WINNT +#if PHP_WIN32 #define STRCASECMP stricmp #else #define STRCASECMP strcasecmp Index: php4/SAPI.h diff -u php4/SAPI.h:1.29 php4/SAPI.h:1.30 --- php4/SAPI.h:1.29 Thu Feb 10 08:44:58 2000 +++ php4/SAPI.h Thu Feb 10 09:14:05 2000 @@ -26,7 +26,7 @@ #define SAPI_POST_BLOCK_SIZE 4000 -#if WIN32||WINNT +#if PHP_WIN32 # ifdef SAPI_EXPORTS # define SAPI_API __declspec(dllexport) # else Index: php4/configuration-parser.y diff -u php4/configuration-parser.y:1.30 php4/configuration-parser.y:1.31 --- php4/configuration-parser.y:1.30 Sun Jan 30 12:31:40 2000 +++ php4/configuration-parser.y Thu Feb 10 09:14:05 2000 @@ -19,7 +19,7 @@ -/* $Id: configuration-parser.y,v 1.30 2000/01/30 20:31:40 zeev Exp $ */ +/* $Id: configuration-parser.y,v 1.31 2000/02/10 17:14:05 andi Exp $ */ #define DEBUG_CFG_PARSER 0 #include "php.h" @@ -161,7 +161,7 @@ if (!env_location) { env_location=""; } -#if WIN32|WINNT +#if 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 WIN32|WINNT +#if 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 WIN32|WINNT +# if 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.37 php4/fopen-wrappers.c:1.38 --- php4/fopen-wrappers.c:1.37 Fri Dec 31 17:31:27 1999 +++ php4/fopen-wrappers.c Thu Feb 10 09:14:05 2000 @@ -16,7 +16,7 @@ | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.c,v 1.37 2000/01/01 01:31:27 sas Exp $ */ +/* $Id: fopen-wrappers.c,v 1.38 2000/02/10 17:14:05 andi Exp $ */ #include "php.h" #include "php_globals.h" @@ -105,7 +105,7 @@ /* Strip filename */ while (( -#if WIN32|WINNT +#if 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 WIN32|WINNT +#if 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 WIN32|WINNT +#if PHP_WIN32 end = strchr(ptr, ';'); #else end = strchr(ptr, ':'); @@ -340,7 +340,7 @@ return fp; } /* Absolute path open - prepend document_root in safe mode */ -#if WIN32|WINNT +#if PHP_WIN32 if ((*filename == '\\') || (*filename == '/') || (filename[1] == ':')) { #else if (*filename == '/') { @@ -381,7 +381,7 @@ ptr = pathbuf; while (ptr && *ptr) { -#if WIN32|WINNT +#if PHP_WIN32 end = strchr(ptr, ';'); #else end = strchr(ptr, ':'); Index: php4/fopen-wrappers.h diff -u php4/fopen-wrappers.h:1.13 php4/fopen-wrappers.h:1.14 --- php4/fopen-wrappers.h:1.13 Fri Dec 31 17:31:27 1999 +++ php4/fopen-wrappers.h Thu Feb 10 09:14:05 2000 @@ -15,7 +15,7 @@ | Authors: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.h,v 1.13 2000/01/01 01:31:27 sas Exp $ */ +/* $Id: fopen-wrappers.h,v 1.14 2000/02/10 17:14:05 andi 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 WIN32|WINNT +#if PHP_WIN32 # define IGNORE_URL_WIN 2 #else # define IGNORE_URL_WIN 0 #endif #define ENFORCE_SAFE_MODE 4 -#if WIN32|WINNT +#if 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.196 php4/main.c:1.197 --- php4/main.c:1.196 Thu Feb 10 08:52:07 2000 +++ php4/main.c Thu Feb 10 09:14:05 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.196 2000/02/10 16:52:07 zeev Exp $ */ +/* $Id: main.c,v 1.197 2000/02/10 17:14:05 andi Exp $ */ #include <stdio.h> @@ -51,7 +51,7 @@ #include "ext/standard/php_standard.h" #include "snprintf.h" #include "php_variables.h" -#if WIN32|WINNT +#if PHP_WIN32 #include <io.h> #include <fcntl.h> #include "win32/syslog.h" Index: php4/mergesort.c diff -u php4/mergesort.c:1.4 php4/mergesort.c:1.5 --- php4/mergesort.c:1.4 Sun Dec 5 08:43:32 1999 +++ php4/mergesort.c Thu Feb 10 09:14:05 2000 @@ -60,7 +60,7 @@ #include "php.h" -#if (WINNT|WIN32) +#if (PHP_WIN32) #include <winsock.h> /* Includes definition for u_char */ #endif Index: php4/php.h diff -u php4/php.h:1.57 php4/php.h:1.58 --- php4/php.h:1.57 Sun Jan 16 11:43:32 2000 +++ php4/php.h Thu Feb 10 09:14:05 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.57 2000/01/16 19:43:32 zeev Exp $ */ +/* $Id: php.h,v 1.58 2000/02/10 17:14:05 andi Exp $ */ #ifndef _PHP_H #define _PHP_H @@ -35,6 +35,8 @@ #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 +61,7 @@ */ -#if WIN32 +#if PHP_WIN32 #include "config.w32.h" #include "win95nt.h" # ifdef PHP_EXPORTS @@ -80,7 +82,7 @@ #define DEBUG ZEND_DEBUG -#if DEBUG || !(defined(__GNUC__)||defined(WIN32)) +#if DEBUG || !(defined(__GNUC__)||PHP_WIN32 #ifdef inline #undef inline #endif @@ -212,7 +214,7 @@ #endif #if HAVE_PWD_H -# if WIN32||WINNT +# if PHP_WIN32 #include "win32/pwd.h" #include "win32/param.h" # else @@ -288,7 +290,7 @@ /* global variables */ extern pval *data; -#if !(WIN32||WINNT) +#if !(PHP_WIN32) extern char **environ; #endif Index: php4/php_realpath.c diff -u php4/php_realpath.c:1.2 php4/php_realpath.c:1.3 --- php4/php_realpath.c:1.2 Fri Dec 31 17:31:27 1999 +++ php4/php_realpath.c Thu Feb 10 09:14:05 2000 @@ -40,7 +40,7 @@ char path_copy[MAXPATHLEN]; /* A work-copy of the path */ char *workpos; /* working position in *path */ -#if !(WIN32|WINNT) +#if !(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 WIN32|WINNT +#if 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 WIN32|WINNT +#if 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 WIN32|WINNT +#if PHP_WIN32 while(*workpos == '\\') workpos++; #else while(*workpos == '/') workpos++; #endif -#if WIN32|WINNT +#if PHP_WIN32 /* reset dotcount */ dotcount = 0; @@ -169,7 +169,7 @@ *writepos++ = *workpos++; } *writepos = 0; -#else /* WIN32|WINNT */ +#else /* 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 /* WIN32|WINNT */ +#endif /* PHP_WIN32 */ } /* Check if the resolved path is a directory */ Index: php4/request_info.c diff -u php4/request_info.c:1.22 php4/request_info.c:1.23 --- php4/request_info.c:1.22 Fri Dec 31 17:31:27 1999 +++ php4/request_info.c Thu Feb 10 09:14:05 2000 @@ -34,7 +34,7 @@ if (!request_info.script_filename) { request_info.script_filename = request_info.php_argv0; } -#if WIN32|WINNT +#if 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 (#10040) next »