Kaydet (Commit) 3ffff2a2 authored tarafından Brett Cannon's avatar Brett Cannon

Add comments at end of every #endif and fix ones already there when for closing

off #ifndef's.
üst e6751180
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#undef EAI_MAX #undef EAI_MAX
#undef getaddrinfo #undef getaddrinfo
#define getaddrinfo fake_getaddrinfo #define getaddrinfo fake_getaddrinfo
#endif #endif /* EAI_ADDRFAMILY */
#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
#define EAI_AGAIN 2 /* temporary failure in name resolution */ #define EAI_AGAIN 2 /* temporary failure in name resolution */
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
#undef AI_ADDRCONFIG #undef AI_ADDRCONFIG
#undef AI_V4MAPPED #undef AI_V4MAPPED
#undef AI_DEFAULT #undef AI_DEFAULT
#endif #endif /* AI_PASSIVE */
#define AI_PASSIVE 0x00000001 /* get address to use bind() */ #define AI_PASSIVE 0x00000001 /* get address to use bind() */
#define AI_CANONNAME 0x00000002 /* fill ai_canonname */ #define AI_CANONNAME 0x00000002 /* fill ai_canonname */
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
/* special recommended flags for getipnodebyname */ /* special recommended flags for getipnodebyname */
#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
#endif /* HAVE_GETADDRINFO */ #endif /* !HAVE_GETADDRINFO */
#ifndef HAVE_GETNAMEINFO #ifndef HAVE_GETNAMEINFO
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
#ifndef NI_MAXHOST #ifndef NI_MAXHOST
#define NI_MAXHOST 1025 #define NI_MAXHOST 1025
#define NI_MAXSERV 32 #define NI_MAXSERV 32
#endif #endif /* !NI_MAXHOST */
/* /*
* Flag values for getnameinfo() * Flag values for getnameinfo()
...@@ -119,9 +119,9 @@ ...@@ -119,9 +119,9 @@
#define NI_NAMEREQD 0x00000004 #define NI_NAMEREQD 0x00000004
#define NI_NUMERICSERV 0x00000008 #define NI_NUMERICSERV 0x00000008
#define NI_DGRAM 0x00000010 #define NI_DGRAM 0x00000010
#endif #endif /* !NI_NOFQDN */
#endif /* HAVE_GETNAMEINFO */ #endif /* !HAVE_GETNAMEINFO */
#ifndef HAVE_ADDRINFO #ifndef HAVE_ADDRINFO
struct addrinfo { struct addrinfo {
...@@ -134,7 +134,7 @@ struct addrinfo { ...@@ -134,7 +134,7 @@ struct addrinfo {
struct sockaddr *ai_addr; /* binary address */ struct sockaddr *ai_addr; /* binary address */
struct addrinfo *ai_next; /* next structure in linked list */ struct addrinfo *ai_next; /* next structure in linked list */
}; };
#endif #endif /* !HAVE_ADDRINFO */
#ifndef HAVE_SOCKADDR_STORAGE #ifndef HAVE_SOCKADDR_STORAGE
/* /*
...@@ -145,7 +145,7 @@ struct addrinfo { ...@@ -145,7 +145,7 @@ struct addrinfo {
#define _SS_ALIGNSIZE (sizeof(PY_LONG_LONG)) #define _SS_ALIGNSIZE (sizeof(PY_LONG_LONG))
#else #else
#define _SS_ALIGNSIZE (sizeof(double)) #define _SS_ALIGNSIZE (sizeof(double))
#endif #endif /* HAVE_LONG_LONG */
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) * 2) #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) * 2)
#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) * 2 - \ #define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) * 2 - \
_SS_PAD1SIZE - _SS_ALIGNSIZE) _SS_PAD1SIZE - _SS_ALIGNSIZE)
...@@ -156,16 +156,16 @@ struct sockaddr_storage { ...@@ -156,16 +156,16 @@ struct sockaddr_storage {
unsigned char ss_family; /* address family */ unsigned char ss_family; /* address family */
#else #else
unsigned short ss_family; /* address family */ unsigned short ss_family; /* address family */
#endif #endif /* HAVE_SOCKADDR_SA_LEN */
char __ss_pad1[_SS_PAD1SIZE]; char __ss_pad1[_SS_PAD1SIZE];
#ifdef HAVE_LONG_LONG #ifdef HAVE_LONG_LONG
PY_LONG_LONG __ss_align; /* force desired structure storage alignment */ PY_LONG_LONG __ss_align; /* force desired structure storage alignment */
#else #else
double __ss_align; /* force desired structure storage alignment */ double __ss_align; /* force desired structure storage alignment */
#endif #endif /* HAVE_LONG_LONG */
char __ss_pad2[_SS_PAD2SIZE]; char __ss_pad2[_SS_PAD2SIZE];
}; };
#endif #endif /* !HAVE_SOCKADDR_STORAGE */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment