]> granicus.if.org Git - php/commitdiff
centralize #include "build-defs.h" and drop (sometimes inconsistent) other
authorSascha Schumann <sas@php.net>
Thu, 24 Oct 2002 13:15:49 +0000 (13:15 +0000)
committerSascha Schumann <sas@php.net>
Thu, 24 Oct 2002 13:15:49 +0000 (13:15 +0000)
instances

31 files changed:
configure.in
ext/dbase/dbase.c
ext/dotnet/php_dotnet.h
ext/ereg/regex/regex_extra.h
ext/fbsql/php_fbsql.c
ext/filepro/filepro.c
ext/gd/gdcache.c
ext/hwapi/hwapi.cpp
ext/hyperwave/hw.c
ext/imap/php_imap.h
ext/informix/ifx.ec
ext/mcal/php_mcal.h
ext/mysql/php_mysql.c
ext/oci8/oci8.c
ext/odbc/php_odbc.c
ext/oracle/oracle.c
ext/rpc/dotnet/php_dotnet.h
ext/standard/dl.c
ext/standard/fsock.c
ext/standard/info.c
ext/standard/mail.c
ext/xml/xml.c
main/main.c
main/php.h
main/php_ini.c
main/streams.c
regex/regex_extra.h
sapi/apache/php_apache.c
sapi/cgi/cgi_main.c
sapi/cli/php_cli.c
sapi/servlet/servlet.c

index 343484779cb6edb68efd213ac264984b04b51545..b701e20800d2173560e08b1ed9ae73f95a95ccce 100644 (file)
@@ -325,6 +325,7 @@ limits.h \
 locale.h \
 monetary.h \
 mach-o/dyld.h \
+netdb.h \
 pwd.h \
 resolv.h \
 signal.h \
@@ -1108,6 +1109,8 @@ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
 PHP_GEN_BUILD_DIRS
 PHP_GEN_GLOBAL_MAKEFILE
 
+AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
+
 $php_shtool mkdir -p pear/scripts
 ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
 pear/scripts/phpize pear/scripts/php-config \
index 3e2514a63ca8c6e3cdf854cda00397a4c6d5de9b..ee48334b895b698c5fa7adbdf371a39ee5e01eeb 100644 (file)
@@ -760,7 +760,7 @@ zend_module_entry dbase_module_entry = {
 #ifdef COMPILE_DL_DBASE
 ZEND_GET_MODULE(dbase)
 
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
+#if defined(PHP_WIN32) && defined(THREAD_SAFE)
 
 /*NOTE: You should have an odbc.def file where you
 export DllMain*/
index b56af145e2deeed13dd86f99c59826a151cb3203..598c0b5579a54a0d78647970f426b905e6038380 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef PHP_DOTNET_H
 #define PHP_DOTNET_H
 
-#if WIN32|WINNT
+#ifdef PHP_WIN32
 
 PHP_MINIT_FUNCTION(DOTNET);
 PHP_MSHUTDOWN_FUNCTION(DOTNET);
@@ -14,7 +14,7 @@ extern zend_module_entry DOTNET_module_entry;
 
 #define DOTNET_module_ptr NULL
 
-#endif  /* Win32|WINNT */
+#endif  /* PHP_WIN32 */
 
 #define phpext_DOTNET_ptr DOTNET_module_ptr
 
index 3db9e4ad1a8e8f53ede63074c38f2f275ac59912..d668f7613f8d480c1eecec8a3c373af2ea4276b4 100644 (file)
@@ -7,7 +7,7 @@
 
 #if (defined(REGEX) && REGEX == 1) || (!defined(REGEX))
 
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
 
 #ifndef PHP_NO_ALIASES
 
index 82dd3965cc8eb1f8afd711093e43773c82cc5fa2..649d01aa2b756d5ca5cdce21525042acdc079b28 100644 (file)
 #include "ext/standard/info.h"
 #include "ext/standard/php_string.h"
 
-#if WIN32|WINNT
+#ifdef PHP_WIN32
 #include <winsock.h>
 #else
 #include <php_config.h>
-#include <build-defs.h>
 
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
index d3a4f86d1f28ed0f8f55452d22c46058eb8ebce4..cb7ec899868c25676112427d523808775a727bc4 100644 (file)
@@ -151,7 +151,7 @@ zend_module_entry filepro_module_entry = {
 
 #ifdef COMPILE_DL_FILEPRO
 ZEND_GET_MODULE(filepro)
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
+#if defined(PHP_WIN32) && defined(THREAD_SAFE)
 
 /*NOTE: You should have an odbc.def file where you
 export DllMain*/
index b89f5610acc1e2661a4e5031ce9167f05438ad9b..7791d1bbf5c48243bf343bd2461c473991c91ae7 100644 (file)
@@ -37,7 +37,7 @@
  */
 
 /* This just seems unessacary */
-#if (WIN32|WINNT)
+#if PHP_WIN32
 #define ENABLE_GD_TTF
 #else
 #include "php_config.h"
index c250d575fdc8a7c546da47e93860d832f00913fe..b08f9ae598e47f596bd3430dba8730d22d527304 100644 (file)
@@ -25,17 +25,17 @@ extern "C"
 {
 #include "php.h"
 #include "php_globals.h"
-//#include "ext/standard/php_standard.h"
 #include "ext/standard/head.h"
 #include "ext/standard/info.h"
-//#include "fopen-wrappers.h"
+#if 0
+#include "ext/standard/php_standard.h"
+#include "fopen-wrappers.h"
+#endif
 #include "SAPI.h"
 }
 
 #ifdef PHP_WIN32
 #include <winsock.h>
-#else
-#include "build-defs.h"
 #endif
 #ifdef HAVE_MMAP 
 #include <sys/mman.h>
index 09a889434b6bca19c1f07c088400c73dbff269c1..9155649deb3b1676e22ffe491b9e7a5e88e40544 100644 (file)
@@ -35,8 +35,6 @@
 
 #ifdef PHP_WIN32
 #include <winsock.h>
-#else
-#include "build-defs.h"
 #endif
 
 #if HYPERWAVE
index 429262fe717a07037b7847b2c71928bab7db68fc..6398895d1d15bab8f6c03a892f87d9d5776421e4 100644 (file)
 
 #if HAVE_IMAP
 
-#ifndef PHP_WIN32
-#include "build-defs.h"
-#endif
-
 #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
  /* these are used for quota support */
 # include "c-client.h" /* includes mail.h and rfc822.h */
index ce2dc757286b7f4e255b73cac206e3ea59560e74..47b2eaab51fcc898b394298ff060ccc0c565dd02 100644 (file)
 
 #ifdef PHP_WIN32
 #include <winsock.h>
-#else
-#include "build-defs.h"
+#endif
 
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+
+#if HAVE_NETDB_H
 #include <netdb.h>
+#endif
+
+#if HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 
index 07b32a2a7fc4e98565a11b497dbd359257e79b9b..1845b4cfd181b0c5995079f5fc38d5a8758cde20 100644 (file)
@@ -5,10 +5,6 @@
 
 #if HAVE_MCAL
 
-#ifndef PHP_WIN32
-#include "build-defs.h"
-#endif
-
 /* Functions accessable to PHP */
 extern zend_module_entry php_mcal_module_entry;
 #define php_mcal_module_ptr &php_mcal_module_entry
index 50ba2a2492bf5ab0885f8b7b660a49bdd201aa4f..e35a404acba0d8264ae45c6618ff0ace2539307a 100644 (file)
@@ -43,7 +43,6 @@
 # include <sys/socket.h>
 # define signal(a, b) NULL
 #else
-# include "build-defs.h"
 # if HAVE_SIGNAL_H
 #  include <signal.h>
 # endif
index 84e2a8996042742fe60253241125bbcf1e6c1a70..1f5ff22e59e1a7b79c0914a6649367b473615802 100644 (file)
@@ -124,10 +124,6 @@ static zend_class_entry *oci_coll_class_entry_ptr;
        } \
 }
 
-#ifndef PHP_WIN32
-#include "build-defs.h"
-#endif
-
 #include <fcntl.h>
 
 #ifndef O_BINARY
index 54d0ca03aa497e53ac451005e443f7933608b99f..1ef4280aec14f80092864a887988885d969c6e11 100644 (file)
@@ -49,8 +49,6 @@
 #define ODBC_TYPE "Win32"
 #define PHP_ODBC_TYPE ODBC_TYPE
 
-#else
-#include "build-defs.h"
 #endif
 
 /*
index a49f10d78c393bb4237a5149d4eda766de31ae6c..cc907e780bedc4d0d31270eb609d04be60d5119d 100644 (file)
 #define PHP_ORA_API
 #endif                                   
 
-#ifndef PHP_WIN32
-#include "build-defs.h"
-#endif 
-
 #ifdef ZTS
 int ora_globals_id;
 #else
index b56af145e2deeed13dd86f99c59826a151cb3203..598c0b5579a54a0d78647970f426b905e6038380 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef PHP_DOTNET_H
 #define PHP_DOTNET_H
 
-#if WIN32|WINNT
+#ifdef PHP_WIN32
 
 PHP_MINIT_FUNCTION(DOTNET);
 PHP_MSHUTDOWN_FUNCTION(DOTNET);
@@ -14,7 +14,7 @@ extern zend_module_entry DOTNET_module_entry;
 
 #define DOTNET_module_ptr NULL
 
-#endif  /* Win32|WINNT */
+#endif  /* PHP_WIN32 */
 
 #define phpext_DOTNET_ptr DOTNET_module_ptr
 
index cdde02ab6f3d81a8c51b0e67736c24954984340c..90ecf3d4cc159a6c499f34365dcadb9beb1f9f07 100644 (file)
 #include "ext/standard/info.h"
 #include "SAPI.h"
 
-#if !defined(PHP_WIN32) && !defined(NETWARE)
-#include "build-defs.h"
-#endif
-
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 #include <stdlib.h>
 #include <stdio.h>
index 629cb720a56f9b9b1a3952f83b84be099facb5c9..64281e6c61c273ed834b41725fe9ee3bf3850b28 100644 (file)
@@ -105,8 +105,6 @@ static int fsock_globals_id;
 #ifdef USE_WINSOCK
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #endif
-#else
-#include "build-defs.h"
 #endif
 
 /* {{{ php_lookup_hostname */
index 6dfccf4ace058b9758a7518414a2f2ecff562cb1..294e48e8cbf48eb64dc2db8b0c629c3c230e8bec 100644 (file)
@@ -31,9 +31,6 @@
 #include "SAPI.h"
 #include <time.h>
 #include "php_main.h"
-#if !defined(PHP_WIN32) && !defined(NETWARE)
-#include "build-defs.h"
-#endif
 #include "zend_globals.h"              /* needs ELS */
 #include "zend_extensions.h"
 #ifdef HAVE_SYS_UTSNAME_H
index c81e33a442b7286712f942ad652ea869184b0e59..e678bcc86e567bdfd5153b953a7a23f15aa0489b 100644 (file)
 #include <stdio.h>
 #include "php.h"
 #include "ext/standard/info.h"
-#if !defined(PHP_WIN32) && !defined(NETWARE)
-#include "build-defs.h"
+
 #if HAVE_SYSEXITS_H
 #include <sysexits.h>
 #endif
 #if HAVE_SYS_SYSEXITS_H
 #include <sys/sysexits.h>
 #endif
-#endif
+
 #include "php_mail.h"
 #include "php_ini.h"
 #include "safe_mode.h"
index 6cfb1f07abf9ea8f864d3212db6c1ece704ee466..e30898dcdf61d73a5da1efe01cfcd8ea1b0f6c4e 100644 (file)
@@ -35,9 +35,6 @@
 
 #if HAVE_LIBEXPAT
 
-#if !defined(PHP_WIN32) && !defined(NETWARE)
-#  include "build-defs.h"
-# endif
 # include "ext/standard/head.h"
 
 /* Short-term TODO list:
index 83eaf25f630bdcbf4eb050ae375d539805acfaad..98a392759d49f44f813cf53bcfa350d3e27e31c8 100644 (file)
@@ -40,8 +40,6 @@
 #ifdef USE_WINSOCK
 #include <novsock2.h>
 #endif
-#else
-#include "build-defs.h"
 #endif
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
index bbaaeaf183325d9905364f8d404561f236bc1715..4cf5e8a7ef9357d2b137e41931bda5b994a0ec42 100644 (file)
 #endif
 
 #ifdef NETWARE
-#define PHP_UNAME  "NetWare"    /* For php_get_uname() function */
-#define PHP_OS      PHP_UNAME  /* This is obtained using 'uname' on Unix and assigned in the case of Windows;
-                                   we'll do it this way atleast for now */
+/* For php_get_uname() function */
+#define PHP_UNAME  "NetWare"
+/*
+ * This is obtained using uname(2) on Unix and assigned in the case of Windows;
+ * we'll do it this way at least for now.
+ */
+#define PHP_OS      PHP_UNAME
 #endif
 
 #include "php_regex.h"
 #include <alloca.h>
 #endif
 
+#if HAVE_BUILD_DEFS_H
+#include "build-defs.h"
+#endif
+
 /*
  * This is a fast version of strlcpy which should be used, if you
  * know the size of the destination buffer and if you know
index f83ceb5c287b9e1350fdd12b50d50d43c36056a4..e439547809b5e6c5603f6f40e9828166d10aed12 100644 (file)
@@ -22,9 +22,6 @@
 #define INI_CHECK_CWD
 
 #include "php.h"
-#if !defined(PHP_WIN32) && !defined(NETWARE)
-#include "build-defs.h"
-#endif
 #include "ext/standard/info.h"
 #include "zend_ini.h"
 #include "php_ini.h"
index d5e3123052210ebbe45e786646606e54116494ce..edeab0488be8dc5ecbc8c02ed0a057cf9583cd17 100755 (executable)
@@ -45,8 +45,6 @@
 
 #ifdef PHP_WIN32
 #define EWOULDBLOCK WSAEWOULDBLOCK
-#else
-#include "build-defs.h"
 #endif
 
 #define STREAM_DEBUG 0
index 3db9e4ad1a8e8f53ede63074c38f2f275ac59912..d668f7613f8d480c1eecec8a3c373af2ea4276b4 100644 (file)
@@ -7,7 +7,7 @@
 
 #if (defined(REGEX) && REGEX == 1) || (!defined(REGEX))
 
-#if !(WIN32|WINNT)
+#ifndef PHP_WIN32
 
 #ifndef PHP_NO_ALIASES
 
index 4cde682d8246765ba3c055417c88dbfa8d1fcbeb..ba9b0aa94ea258b6df84a57f7e0efdee2d119d42 100644 (file)
@@ -24,8 +24,6 @@
 #if defined(PHP_WIN32) || defined(NETWARE)
 #include "zend.h"
 #include "ap_compat.h"
-#else
-#include "build-defs.h"
 #endif
 
 #ifdef ZTS
index 88305f861341a939add5b654d4758d78cb8d4528..21b62ae9b24328a5335ad067a7c7850a891dec05 100644 (file)
@@ -34,8 +34,6 @@
 #include "win32/time.h"
 #include "win32/signal.h"
 #include <process.h>
-#else
-#include "build-defs.h"
 #endif
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
index 859e3127d38a1b1d420fe69fd6c72288311dd386..2e0743929978cf1bb198d91398b0701475fb1628 100644 (file)
@@ -33,8 +33,6 @@
 #include "win32/time.h"
 #include "win32/signal.h"
 #include <process.h>
-#else
-#include "build-defs.h"
 #endif
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
index 538a603f8c7f96aa8ca77cec9c4324241e700313..be2ead961303ff00e11a0ba0c166e398b7ca0064 100644 (file)
@@ -29,8 +29,6 @@
 #include "win32/time.h"
 #include "win32/signal.h"
 #include <process.h>
-#else
-#include "build-defs.h"
 #endif
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>