diff options
author | Pierre Joye <pajoye@php.net> | 2008-08-23 19:22:10 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2008-08-23 19:22:10 +0000 |
commit | 2620304003d8e004ac3fc93d8293b5b575514f44 (patch) | |
tree | 5d61491d9769d05a2efa93c2e2e68bcba547a94a /ext/standard | |
parent | 847284086bddcd5fd31eaa4869ec0d521dfd7289 (diff) | |
download | php-git-2620304003d8e004ac3fc93d8293b5b575514f44.tar.gz |
- MFH:
- drop bindlib usage on windows
- inet_pton, inet_ntop and inet_aton are always available (VC9 uses the CRT implementation, VC6 our own)
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/basic_functions.c | 6 | ||||
-rw-r--r-- | ext/standard/dns.c | 21 | ||||
-rw-r--r-- | ext/standard/flock_compat.c | 9 | ||||
-rw-r--r-- | ext/standard/flock_compat.h | 1 |
4 files changed, 16 insertions, 21 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 5d35174545..0fc77d4cdf 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -63,7 +63,11 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #include <netinet/in.h> #endif -#include <netdb.h> +#ifndef PHP_WIN32 +# include <netdb.h> +#else +#include "win32/inet.h" +#endif #if HAVE_ARPA_INET_H # include <arpa/inet.h> diff --git a/ext/standard/dns.c b/ext/standard/dns.c index f559f79572..39412adc86 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -29,23 +29,10 @@ #endif #ifdef PHP_WIN32 -#if HAVE_LIBBIND -#ifndef WINNT -#define WINNT 1 -#endif -/* located in www.php.net/extra/bindlib.zip */ -#if HAVE_ARPA_INET_H -#include "arpa/inet.h" -#endif -#include "netdb.h" -#if HAVE_ARPA_NAMESERV_H -#include "arpa/nameser.h" -#endif -#if HAVE_RESOLV_H -#include "resolv.h" -#endif -#endif /* HAVE_LIBBIND */ -#include <winsock2.h> +# include "win32/inet.h" +# include <winsock2.h> +# include <windows.h> +# include <Ws2tcpip.h> #else /* This holds good for NetWare too, both for Winsock and Berkeley sockets */ #include <netinet/in.h> #if HAVE_ARPA_INET_H diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index 9bbb507d79..d561945533 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -30,6 +30,7 @@ #ifdef PHP_WIN32 #include <io.h> +#include "config.w32.h" #endif #ifdef NETWARE @@ -44,7 +45,7 @@ PHPAPI int flock(int fd, int operation) #endif /* !defined(HAVE_FLOCK) */ PHPAPI int php_flock(int fd, int operation) -#if HAVE_STRUCT_FLOCK +#if HAVE_STRUCT_FLOCK /* {{{ */ { struct flock flck; int ret; @@ -73,7 +74,8 @@ PHPAPI int php_flock(int fd, int operation) return ret; } -#elif defined(PHP_WIN32) +/* }}} */ +#elif defined(PHP_WIN32) /* {{{ */ /* * Program: Unix compatibility routines * @@ -152,6 +154,7 @@ PHPAPI int php_flock(int fd, int operation) #endif return -1; } +/* }}} */ #else #warning no proper flock support for your site { @@ -160,6 +163,7 @@ PHPAPI int php_flock(int fd, int operation) } #endif +#ifndef PHP_WIN32 #if !(HAVE_INET_ATON) /* {{{ inet_aton * Check whether "cp" is a valid ascii representation @@ -223,6 +227,7 @@ int inet_aton(const char *cp, struct in_addr *ap) } /* }}} */ #endif /* !HAVE_INET_ATON */ +#endif /* * Local variables: diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index 3e0fcd7c33..76912ff529 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -49,7 +49,6 @@ PHPAPI int flock(int fd, int operation); #include <arpa/inet.h> #endif -extern int inet_aton(const char *, struct in_addr *); #endif #endif /* FLOCK_COMPAT_H */ |