diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/config.w32.h | 2 | ||||
-rw-r--r-- | main/fopen_wrappers.c | 2 | ||||
-rw-r--r-- | main/internal_functions_registry.h | 10 | ||||
-rw-r--r-- | main/php.h | 51 | ||||
-rw-r--r-- | main/php_regex.h | 3 | ||||
-rw-r--r-- | main/snprintf.c | 36 | ||||
-rw-r--r-- | main/snprintf.h | 14 | ||||
-rw-r--r-- | main/win95nt.h | 4 |
8 files changed, 29 insertions, 93 deletions
diff --git a/main/config.w32.h b/main/config.w32.h index e12c7efe33..d9f8b1ecf2 100644 --- a/main/config.w32.h +++ b/main/config.w32.h @@ -97,8 +97,6 @@ will move to the "don't touch" list below eventualy. ---------------------------------------------------------------*/ -/*#define APACHE 0 defined in preprocessor section*/ - /* ---------------------------------------------------------------- The following should never need to be played with diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 4dd5c7d734..28706af514 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -208,7 +208,6 @@ PHPAPI FILE *php_fopen_wrapper(char *path, char *mode, int options, int *issock, } } -#if CGI_BINARY || FHTTPD || USE_SAPI PHPAPI FILE *php_fopen_primary_script(void) { @@ -307,7 +306,6 @@ PHPAPI FILE *php_fopen_primary_script(void) return fp; } -#endif /* CGI_BINARY || USE_SAPI */ /* * Tries to open a file with a PATH-style list of directories. diff --git a/main/internal_functions_registry.h b/main/internal_functions_registry.h index 7152eb8b16..a2d71969e5 100644 --- a/main/internal_functions_registry.h +++ b/main/internal_functions_registry.h @@ -25,16 +25,6 @@ extern int php_init_mime(INIT_FUNC_ARGS); -#if 0 -#if APACHE -extern zend_module_entry apache_module_entry; -#define phpext_apache_ptr &apache_module_entry -extern void php_virtual(INTERNAL_FUNCTION_PARAMETERS); -#else -#define phpext_apache_ptr NULL -#endif -#endif - /* environment functions */ extern int php_init_environment(void); diff --git a/main/php.h b/main/php.h index cefb35e6b5..ff8c3c8c43 100644 --- a/main/php.h +++ b/main/php.h @@ -30,8 +30,6 @@ #define YYDEBUG 0 -#define CGI_BINARY (!APACHE && !USE_SAPI && !FHTTPD) - #include "php_version.h" #include "zend.h" @@ -89,6 +87,8 @@ extern unsigned char second_arg_allow_ref[]; #define inline #endif +#define APACHE 0 +#define CGI_BINARY 0 #if HAVE_UNIX_H #include <unix.h> @@ -116,19 +116,6 @@ typedef unsigned int socklen_t; #include "request_info.h" -#if HAVE_LIBDL -# if MSVC5 -# include <windows.h> -# define dlclose FreeLibrary -# define dlopen(a,b) LoadLibrary(a) -# define dlsym GetProcAddress -# else -#if HAVE_DLFCN_H && !((defined(_AIX) || defined(AIX)) && APACHE) -# include <dlfcn.h> -#endif -# endif -#endif - #define CREATE_MUTEX(a,b) #define SET_MUTEX(a) #define FREE_MUTEX(a) @@ -180,35 +167,6 @@ extern char *strerror(int); #include "fopen-wrappers.h" -#if APACHE /* apache httpd */ -# if HAVE_AP_CONFIG_H -#include "ap_config_auto.h" -#ifdef RHAPSODY -#undef HAVE_SNPRINTF -#endif -#include "ap_config.h" -#ifdef RHAPSODY -#undef HAVE_SNPRINTF -#define HAVE_SNPRINTF 1 -#endif -# endif -# if HAVE_OLD_COMPAT_H -#include "compat.h" -# endif -# if HAVE_AP_COMPAT_H -#include "ap_compat.h" -# endif -#include "httpd.h" -#include "http_main.h" -#include "http_core.h" -#include "http_request.h" -#include "http_protocol.h" -#include "http_config.h" -#include "http_log.h" -#define BLOCK_INTERRUPTIONS block_alarms -#define UNBLOCK_INTERRUPTIONS unblock_alarms -#endif - #if REGEX == 1 || REGEX == 0 #include "regex/regex_extra.h" #endif @@ -222,10 +180,6 @@ extern char *strerror(int); #include <sys/param.h> # endif #endif -#if CGI_BINARY /* CGI version */ -#define BLOCK_INTERRUPTIONS NULL -#define UNBLOCK_INTERRUPTIONS NULL -#endif #if HAVE_LIMITS_H #include <limits.h> @@ -292,6 +246,7 @@ extern int ap_vsnprintf(char *, size_t, const char *, va_list); extern pval *data; #if !(PHP_WIN32) extern char **environ; +#define php_sleep sleep #endif extern void phperror(char *error); diff --git a/main/php_regex.h b/main/php_regex.h index be0f445af7..f4dc865163 100644 --- a/main/php_regex.h +++ b/main/php_regex.h @@ -5,10 +5,9 @@ * REGEX means: * 0.. system regex * 1.. bundled regex - * 2.. Apache's regex */ -#if REGEX == 1 +#if REGEX /* get aliases */ #include "regex/regex_extra.h" #include "regex/regex.h" diff --git a/main/snprintf.c b/main/snprintf.c index 4437dee003..b3afec1146 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -55,7 +55,6 @@ #include "php.h" -#if !defined(APACHE) || (!APACHE) #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) #include <stdio.h> @@ -69,9 +68,9 @@ #ifdef HAVE_GCVT -#define ap_ecvt ecvt -#define ap_fcvt fcvt -#define ap_gcvt gcvt +#define ap_php_ecvt ecvt +#define ap_php_fcvt fcvt +#define ap_php_gcvt gcvt #else @@ -81,7 +80,7 @@ */ /* - * ap_ecvt converts to decimal + * ap_php_ecvt converts to decimal * the number of digits is specified by ndigit * decpt is set to the position of the decimal point * sign is set to 0 for positive, 1 for negative @@ -90,7 +89,7 @@ #define NDIG 80 static char * - ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag) + ap_php_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag) { register int r2; double fi, fj; @@ -164,30 +163,30 @@ static char * } static char * - ap_ecvt(double arg, int ndigits, int *decpt, int *sign) + ap_php_ecvt(double arg, int ndigits, int *decpt, int *sign) { - return (ap_cvt(arg, ndigits, decpt, sign, 1)); + return (ap_php_cvt(arg, ndigits, decpt, sign, 1)); } static char * - ap_fcvt(double arg, int ndigits, int *decpt, int *sign) + ap_php_fcvt(double arg, int ndigits, int *decpt, int *sign) { - return (ap_cvt(arg, ndigits, decpt, sign, 0)); + return (ap_php_cvt(arg, ndigits, decpt, sign, 0)); } /* - * ap_gcvt - Floating output conversion to + * ap_php_gcvt - Floating output conversion to * minimal length string */ static char * - ap_gcvt(double number, int ndigit, char *buf) + ap_php_gcvt(double number, int ndigit, char *buf) { int sign, decpt; register char *p1, *p2; register i; - p1 = ap_ecvt(number, ndigit, &decpt, &sign); + p1 = ap_php_ecvt(number, ndigit, &decpt, &sign); p2 = buf; if (sign) *p2++ = '-'; @@ -413,9 +412,9 @@ static char * int decimal_point; if (format == 'f') - p = ap_fcvt(num, precision, &decimal_point, is_negative); + p = ap_php_fcvt(num, precision, &decimal_point, is_negative); else /* either e or E format */ - p = ap_ecvt(num, precision + 1, &decimal_point, is_negative); + p = ap_php_ecvt(num, precision + 1, &decimal_point, is_negative); /* * Check for Infinity and NaN @@ -765,7 +764,7 @@ static int format_converter(register buffy * odp, const char *fmt, /* * * We use &num_buf[ 1 ], so that we have room for the sign */ - s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1]); + s = ap_php_gcvt(va_arg(ap, double), precision, &num_buf[1]); if (*s == '-') prefix_char = *s++; else if (print_sign) @@ -910,7 +909,7 @@ static void strx_printv(int *ccp, char *buf, size_t len, const char *format, } -int ap_snprintf(char *buf, size_t len, const char *format,...) +int ap_php_snprintf(char *buf, size_t len, const char *format,...) { int cc; va_list ap; @@ -922,7 +921,7 @@ int ap_snprintf(char *buf, size_t len, const char *format,...) } -int ap_vsnprintf(char *buf, size_t len, const char *format, va_list ap) +int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap) { int cc; @@ -931,4 +930,3 @@ int ap_vsnprintf(char *buf, size_t len, const char *format, va_list ap) } #endif /* HAVE_SNPRINTF */ -#endif /* APACHE */ diff --git a/main/snprintf.h b/main/snprintf.h index 7c9afdbff8..e9a10e4e79 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -16,17 +16,17 @@ +----------------------------------------------------------------------+ */ -#ifndef _PHP3_SNPRINTF_H -#define _PHP3_SNPRINTF_H +#ifndef _PHP_SNPRINTF_H +#define _PHP_SNPRINTF_H #ifndef HAVE_SNPRINTF -extern int ap_snprintf(char *, size_t, const char *, ...); -#define snprintf ap_snprintf +extern int ap_php_snprintf(char *, size_t, const char *, ...); +#define snprintf ap_php_snprintf #endif #ifndef HAVE_VSNPRINTF -extern int ap_vsnprintf(char *, size_t, const char *, va_list ap); -#define vsnprintf ap_vsnprintf +extern int ap_php_vsnprintf(char *, size_t, const char *, va_list ap); +#define vsnprintf ap_php_vsnprintf #endif #if BROKEN_SPRINTF @@ -35,7 +35,7 @@ int php_sprintf (char* s, const char* format, ...); #define php_sprintf sprintf #endif -#endif /* _PHP3_SNPRINTF_H */ +#endif /* _PHP_SNPRINTF_H */ /* * Local variables: diff --git a/main/win95nt.h b/main/win95nt.h index b481d70f61..1d565aa8f6 100644 --- a/main/win95nt.h +++ b/main/win95nt.h @@ -25,9 +25,7 @@ typedef char * caddr_t; #define mkdir(a,b) _mkdir(a) #define rmdir _rmdir #define getpid _getpid -#if !(APACHE) -#define sleep(t) Sleep(t*1000) -#endif +#define php_sleep(t) Sleep(t*1000) #define getcwd _getcwd #define snprintf _snprintf #define off_t _off_t |