Skip to content

Commit 3ffff2a

Browse files
committed
Add comments at end of every #endif and fix ones already there when for closing
off #ifndef's.
1 parent e675118 commit 3ffff2a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

Modules/addrinfo.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#undef EAI_MAX
5454
#undef getaddrinfo
5555
#define getaddrinfo fake_getaddrinfo
56-
#endif
56+
#endif /* EAI_ADDRFAMILY */
5757

5858
#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
5959
#define EAI_AGAIN 2 /* temporary failure in name resolution */
@@ -83,7 +83,7 @@
8383
#undef AI_ADDRCONFIG
8484
#undef AI_V4MAPPED
8585
#undef AI_DEFAULT
86-
#endif
86+
#endif /* AI_PASSIVE */
8787

8888
#define AI_PASSIVE 0x00000001 /* get address to use bind() */
8989
#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
@@ -98,7 +98,7 @@
9898
/* special recommended flags for getipnodebyname */
9999
#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
100100

101-
#endif /* HAVE_GETADDRINFO */
101+
#endif /* !HAVE_GETADDRINFO */
102102

103103
#ifndef HAVE_GETNAMEINFO
104104

@@ -108,7 +108,7 @@
108108
#ifndef NI_MAXHOST
109109
#define NI_MAXHOST 1025
110110
#define NI_MAXSERV 32
111-
#endif
111+
#endif /* !NI_MAXHOST */
112112

113113
/*
114114
* Flag values for getnameinfo()
@@ -119,9 +119,9 @@
119119
#define NI_NAMEREQD 0x00000004
120120
#define NI_NUMERICSERV 0x00000008
121121
#define NI_DGRAM 0x00000010
122-
#endif
122+
#endif /* !NI_NOFQDN */
123123

124-
#endif /* HAVE_GETNAMEINFO */
124+
#endif /* !HAVE_GETNAMEINFO */
125125

126126
#ifndef HAVE_ADDRINFO
127127
struct addrinfo {
@@ -134,7 +134,7 @@ struct addrinfo {
134134
struct sockaddr *ai_addr; /* binary address */
135135
struct addrinfo *ai_next; /* next structure in linked list */
136136
};
137-
#endif
137+
#endif /* !HAVE_ADDRINFO */
138138

139139
#ifndef HAVE_SOCKADDR_STORAGE
140140
/*
@@ -145,7 +145,7 @@ struct addrinfo {
145145
#define _SS_ALIGNSIZE (sizeof(PY_LONG_LONG))
146146
#else
147147
#define _SS_ALIGNSIZE (sizeof(double))
148-
#endif
148+
#endif /* HAVE_LONG_LONG */
149149
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) * 2)
150150
#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) * 2 - \
151151
_SS_PAD1SIZE - _SS_ALIGNSIZE)
@@ -156,16 +156,16 @@ struct sockaddr_storage {
156156
unsigned char ss_family; /* address family */
157157
#else
158158
unsigned short ss_family; /* address family */
159-
#endif
159+
#endif /* HAVE_SOCKADDR_SA_LEN */
160160
char __ss_pad1[_SS_PAD1SIZE];
161161
#ifdef HAVE_LONG_LONG
162162
PY_LONG_LONG __ss_align; /* force desired structure storage alignment */
163163
#else
164164
double __ss_align; /* force desired structure storage alignment */
165-
#endif
165+
#endif /* HAVE_LONG_LONG */
166166
char __ss_pad2[_SS_PAD2SIZE];
167167
};
168-
#endif
168+
#endif /* !HAVE_SOCKADDR_STORAGE */
169169

170170
#ifdef __cplusplus
171171
extern "C" {

0 commit comments

Comments
 (0)