#include <stddef.h>
+
+
#ifdef PHP_WIN32
+# include <Ws2tcpip.h>
# include "win32/inet.h"
# define O_RDONLY _O_RDONLY
# include "win32/param.h"
/* Define the minimum supported version */
#undef _WIN32_WINNT
#undef NTDDI_VERSION
-#define _WIN32_WINNT 0x502
-#define NTDDI_VERSION _WIN32_WIN2K
+#define _WIN32_WINNT 0x0600
+#define NTDDI_VERSION 0x06000100
/* Default PHP / PEAR directories */
#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):""
#include "config.w32.h"
-#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */
#include "php.h"
#include <winsock2.h>
#include <windows.h>
#include <Ws2tcpip.h>
#include "inet.h"
+#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */
+
PHPAPI int inet_pton(int af, const char* src, void* dst)
{
return NULL;
}
+#endif
+
int inet_aton(const char *cp, struct in_addr *inp) {
inp->s_addr = inet_addr(cp);
return 1;
}
-#endif
#if (_WIN32_WINNT <= 0x502)
PHPAPI int inet_pton(int af, const char* src, void* dst);
PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size);
-PHPAPI int inet_aton(const char *cp, struct in_addr *inp);
#endif
+
+PHPAPI int inet_aton(const char *cp, struct in_addr *inp);
#ifndef NETWARE
#include <winsock2.h>
#include "time.h"
+# include <Ws2tcpip.h>
#else /* NETWARE */
#include <netware/sendmail_nw.h>
#endif /* NETWARE */