Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Side by Side Diff: Modules/socketmodule.h

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Modules/socketmodule.c ('k') | Modules/_winapi.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Socket module header file */ 1 /* Socket module header file */
2 2
3 /* Includes needed for the sockaddr_* symbols below */ 3 /* Includes needed for the sockaddr_* symbols below */
4 #ifndef MS_WINDOWS 4 #ifndef MS_WINDOWS
5 #ifdef __VMS 5 #ifdef __VMS
6 # include <socket.h> 6 # include <socket.h>
7 # else 7 # else
8 # include <sys/socket.h> 8 # include <sys/socket.h>
9 # endif 9 # endif
10 # include <netinet/in.h> 10 # include <netinet/in.h>
11 # if !(defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP))) 11 # if !(defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP)))
12 # include <netinet/tcp.h> 12 # include <netinet/tcp.h>
13 # endif 13 # endif
14 14
15 #else /* MS_WINDOWS */ 15 #else /* MS_WINDOWS */
16 #ifdef socklen_t
17 /* Configure script define to int on windows for GCC compiler.
18 Avoid GCC 4.4+ error (two or more data types in declaration specifiers)
19 as undef it first.
20 */
21 # undef socklen_t
22 #endif
16 # include <winsock2.h> 23 # include <winsock2.h>
17 # include <ws2tcpip.h> 24 # include <ws2tcpip.h>
18 /* VC6 is shipped with old platform headers, and does not have MSTcpIP.h 25 /* VC6 is shipped with old platform headers, and does not have MSTcpIP.h
19 * Separate SDKs have all the functions we want, but older ones don't have 26 * Separate SDKs have all the functions we want, but older ones don't have
20 * any version information. 27 * any version information.
21 * I use SIO_GET_MULTICAST_FILTER to detect a decent SDK. 28 * I use SIO_GET_MULTICAST_FILTER to detect a decent SDK.
22 */ 29 */
23 # ifdef SIO_GET_MULTICAST_FILTER 30 # ifdef SIO_GET_MULTICAST_FILTER
24 # include <MSTcpIP.h> /* for SIO_RCVALL */ 31 # include <mstcpip.h> /* for SIO_RCVALL */
25 # define HAVE_ADDRINFO 32 # define HAVE_ADDRINFO
26 # define HAVE_SOCKADDR_STORAGE 33 # define HAVE_SOCKADDR_STORAGE
27 # define HAVE_GETADDRINFO 34 # define HAVE_GETADDRINFO
28 # define HAVE_GETNAMEINFO 35 # define HAVE_GETNAMEINFO
29 # define ENABLE_IPV6 36 # define ENABLE_IPV6
30 # else 37 # else
31 typedef int socklen_t; 38 typedef int socklen_t;
32 # endif /* IPPROTO_IPV6 */ 39 # endif /* IPPROTO_IPV6 */
33 #endif /* MS_WINDOWS */ 40 #endif /* MS_WINDOWS */
34 41
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 PyObject *error; 230 PyObject *error;
224 PyObject *timeout_error; 231 PyObject *timeout_error;
225 } PySocketModule_APIObject; 232 } PySocketModule_APIObject;
226 233
227 #define PySocketModule_ImportModuleAndAPI() PyCapsule_Import(PySocket_CAPSULE_NA ME, 1) 234 #define PySocketModule_ImportModuleAndAPI() PyCapsule_Import(PySocket_CAPSULE_NA ME, 1)
228 235
229 #ifdef __cplusplus 236 #ifdef __cplusplus
230 } 237 }
231 #endif 238 #endif
232 #endif /* !Py__SOCKET_H */ 239 #endif /* !Py__SOCKET_H */
OLDNEW
« no previous file with comments | « Modules/socketmodule.c ('k') | Modules/_winapi.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+