File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -409,8 +409,11 @@ PyGAI_Err(int error)
409409{
410410 PyObject * v ;
411411
412+ #ifdef EAI_SYSTEM
413+ /* EAI_SYSTEM is not available on Windows XP. */
412414 if (error == EAI_SYSTEM )
413415 return PySocket_Err ();
416+ #endif
414417
415418#ifdef HAVE_GAI_STRERROR
416419 v = Py_BuildValue ("(is)" , error , gai_strerror (error ));
Original file line number Diff line number Diff line change 99# endif
1010
1111#else /* MS_WINDOWS */
12+ #if _MSC_VER >= 1300
13+ # include <winsock2.h>
14+ # include <ws2tcpip.h>
15+ # define HAVE_ADDRINFO
16+ # define HAVE_SOCKADDR_STORAGE
17+ # define HAVE_GETADDRINFO
18+ # define HAVE_GETNAMEINFO
19+ # define ENABLE_IPV6
20+ #else
1221# include <winsock.h>
1322#endif
23+ #endif
1424
1525#ifdef HAVE_SYS_UN_H
1626# include <sys/un.h>
Original file line number Diff line number Diff line change @@ -408,7 +408,11 @@ typedef int pid_t;
408408/* #undef size_t */
409409
410410/* Define to `int' if <sys/types.h> doesn't define. */
411+ #if _MSC_VER + 0 >= 1300
412+ /* VC.NET typedefs socklen_t in ws2tcpip.h. */
413+ #else
411414#define socklen_t int
415+ #endif
412416
413417/* Define if you have the ANSI C header files. */
414418#define STDC_HEADERS 1
You can’t perform that action at this time.
0 commit comments