diff options
Diffstat (limited to 'gl/netdb.in.h')
| -rw-r--r-- | gl/netdb.in.h | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/gl/netdb.in.h b/gl/netdb.in.h index 43409b2f..22059ea0 100644 --- a/gl/netdb.in.h +++ b/gl/netdb.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Provide a netdb.h header file for systems lacking it (read: MinGW). | 1 | /* Provide a netdb.h header file for systems lacking it (read: MinGW). |
| 2 | Copyright (C) 2008-2024 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. |
| 3 | Written by Simon Josefsson. | 3 | Written by Simon Josefsson. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| @@ -54,6 +54,14 @@ | |||
| 54 | /* Declarations for a platform that lacks <netdb.h>, or where it is | 54 | /* Declarations for a platform that lacks <netdb.h>, or where it is |
| 55 | incomplete. */ | 55 | incomplete. */ |
| 56 | 56 | ||
| 57 | /* Maximum length of a fully-qualified domain name. */ | ||
| 58 | #undef NI_MAXHOST | ||
| 59 | #define NI_MAXHOST 1025 | ||
| 60 | |||
| 61 | /* Maximum length of a service. */ | ||
| 62 | #undef NI_MAXSERV | ||
| 63 | #define NI_MAXSERV 32 | ||
| 64 | |||
| 57 | #if @GNULIB_GETADDRINFO@ | 65 | #if @GNULIB_GETADDRINFO@ |
| 58 | 66 | ||
| 59 | # if !@HAVE_STRUCT_ADDRINFO@ | 67 | # if !@HAVE_STRUCT_ADDRINFO@ |
| @@ -91,12 +99,11 @@ struct addrinfo | |||
| 91 | # ifndef AI_CANONNAME | 99 | # ifndef AI_CANONNAME |
| 92 | # define AI_CANONNAME 0x0002 /* Request for canonical name. */ | 100 | # define AI_CANONNAME 0x0002 /* Request for canonical name. */ |
| 93 | # endif | 101 | # endif |
| 94 | # ifndef AI_NUMERICSERV | 102 | # ifndef AI_NUMERICHOST |
| 95 | # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ | 103 | # define AI_NUMERICHOST 0x0004 /* Return numeric host address as name. */ |
| 96 | # endif | 104 | # endif |
| 97 | 105 | # ifndef AI_NUMERICSERV | |
| 98 | # if 0 | 106 | # define AI_NUMERICSERV 0x0400 /* Return service number as service name. */ |
| 99 | # define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ | ||
| 100 | # endif | 107 | # endif |
| 101 | 108 | ||
| 102 | /* These symbolic constants are required to be present by POSIX, but | 109 | /* These symbolic constants are required to be present by POSIX, but |
| @@ -176,7 +183,7 @@ _GL_FUNCDECL_RPL (getaddrinfo, int, | |||
| 176 | (const char *restrict nodename, | 183 | (const char *restrict nodename, |
| 177 | const char *restrict servname, | 184 | const char *restrict servname, |
| 178 | const struct addrinfo *restrict hints, | 185 | const struct addrinfo *restrict hints, |
| 179 | struct addrinfo **restrict res) | 186 | struct addrinfo **restrict res), |
| 180 | _GL_ARG_NONNULL ((4))); | 187 | _GL_ARG_NONNULL ((4))); |
| 181 | _GL_CXXALIAS_RPL (getaddrinfo, int, | 188 | _GL_CXXALIAS_RPL (getaddrinfo, int, |
| 182 | (const char *restrict nodename, | 189 | (const char *restrict nodename, |
| @@ -189,7 +196,7 @@ _GL_FUNCDECL_SYS (getaddrinfo, int, | |||
| 189 | (const char *restrict nodename, | 196 | (const char *restrict nodename, |
| 190 | const char *restrict servname, | 197 | const char *restrict servname, |
| 191 | const struct addrinfo *restrict hints, | 198 | const struct addrinfo *restrict hints, |
| 192 | struct addrinfo **restrict res) | 199 | struct addrinfo **restrict res), |
| 193 | _GL_ARG_NONNULL ((4))); | 200 | _GL_ARG_NONNULL ((4))); |
| 194 | # endif | 201 | # endif |
| 195 | _GL_CXXALIAS_SYS (getaddrinfo, int, | 202 | _GL_CXXALIAS_SYS (getaddrinfo, int, |
| @@ -208,12 +215,12 @@ _GL_CXXALIASWARN (getaddrinfo); | |||
| 208 | # undef freeaddrinfo | 215 | # undef freeaddrinfo |
| 209 | # define freeaddrinfo rpl_freeaddrinfo | 216 | # define freeaddrinfo rpl_freeaddrinfo |
| 210 | # endif | 217 | # endif |
| 211 | _GL_FUNCDECL_RPL (freeaddrinfo, void, (struct addrinfo *ai) | 218 | _GL_FUNCDECL_RPL (freeaddrinfo, void, (struct addrinfo *ai), |
| 212 | _GL_ARG_NONNULL ((1))); | 219 | _GL_ARG_NONNULL ((1))); |
| 213 | _GL_CXXALIAS_RPL (freeaddrinfo, void, (struct addrinfo *ai)); | 220 | _GL_CXXALIAS_RPL (freeaddrinfo, void, (struct addrinfo *ai)); |
| 214 | # else | 221 | # else |
| 215 | # if !@HAVE_DECL_FREEADDRINFO@ | 222 | # if !@HAVE_DECL_FREEADDRINFO@ |
| 216 | _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai) | 223 | _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai), |
| 217 | _GL_ARG_NONNULL ((1))); | 224 | _GL_ARG_NONNULL ((1))); |
| 218 | # endif | 225 | # endif |
| 219 | _GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai)); | 226 | _GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai)); |
| @@ -225,14 +232,14 @@ _GL_CXXALIASWARN (freeaddrinfo); | |||
| 225 | # undef gai_strerror | 232 | # undef gai_strerror |
| 226 | # define gai_strerror rpl_gai_strerror | 233 | # define gai_strerror rpl_gai_strerror |
| 227 | # endif | 234 | # endif |
| 228 | _GL_FUNCDECL_RPL (gai_strerror, const char *, (int ecode)); | 235 | _GL_FUNCDECL_RPL (gai_strerror, const char *, (int ecode), ); |
| 229 | _GL_CXXALIAS_RPL (gai_strerror, const char *, (int ecode)); | 236 | _GL_CXXALIAS_RPL (gai_strerror, const char *, (int ecode)); |
| 230 | # else | 237 | # else |
| 231 | # if !@HAVE_DECL_GAI_STRERROR@ | 238 | # if !@HAVE_DECL_GAI_STRERROR@ |
| 232 | /* Convert error return from getaddrinfo() to a string. | 239 | /* Convert error return from getaddrinfo() to a string. |
| 233 | For more details, see the POSIX:2008 specification | 240 | For more details, see the POSIX:2008 specification |
| 234 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gai_strerror.html>. */ | 241 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gai_strerror.html>. */ |
| 235 | _GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode)); | 242 | _GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode), ); |
| 236 | # endif | 243 | # endif |
| 237 | _GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode)); | 244 | _GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode)); |
| 238 | # endif | 245 | # endif |
| @@ -248,7 +255,7 @@ _GL_FUNCDECL_SYS (getnameinfo, int, | |||
| 248 | (const struct sockaddr *restrict sa, socklen_t salen, | 255 | (const struct sockaddr *restrict sa, socklen_t salen, |
| 249 | char *restrict node, socklen_t nodelen, | 256 | char *restrict node, socklen_t nodelen, |
| 250 | char *restrict service, socklen_t servicelen, | 257 | char *restrict service, socklen_t servicelen, |
| 251 | int flags) | 258 | int flags), |
| 252 | _GL_ARG_NONNULL ((1))); | 259 | _GL_ARG_NONNULL ((1))); |
| 253 | # endif | 260 | # endif |
| 254 | /* Need to cast, because on glibc systems, the seventh parameter is | 261 | /* Need to cast, because on glibc systems, the seventh parameter is |
