Skip to content

Commit

Permalink
- bump minimum version, no more XP/2003
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejoye committed Mar 4, 2012
1 parent 4e2e632 commit 9499410
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions main/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

#include <stddef.h>



#ifdef PHP_WIN32
# include <Ws2tcpip.h>
# include "win32/inet.h"
# define O_RDONLY _O_RDONLY
# include "win32/param.h"
Expand Down
4 changes: 2 additions & 2 deletions win32/build/config.w32.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/* 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"):""
Expand Down
6 changes: 4 additions & 2 deletions win32/inet.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#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)
{
Expand Down Expand Up @@ -76,6 +77,8 @@ PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size)
return NULL;
}

#endif

int inet_aton(const char *cp, struct in_addr *inp) {
inp->s_addr = inet_addr(cp);

Expand All @@ -85,4 +88,3 @@ int inet_aton(const char *cp, struct in_addr *inp) {

return 1;
}
#endif
3 changes: 2 additions & 1 deletion win32/inet.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
#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);
1 change: 1 addition & 0 deletions win32/sendmail.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef NETWARE
#include <winsock2.h>
#include "time.h"
# include <Ws2tcpip.h>
#else /* NETWARE */
#include <netware/sendmail_nw.h>
#endif /* NETWARE */
Expand Down

0 comments on commit 9499410

Please sign in to comment.