diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-01-31 13:46:01 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-01-31 13:46:01 (GMT) |
commit | e8bd88d1fcded01ccd066572eeaae1b507989cb3 (patch) | |
tree | c8e7be6c07c6f635f6e803e6a6ba9e7a95fee7c0 /gl/netdb.in.h | |
parent | 2ad962c13473607ca0d974bfaa516a0ed53ec73d (diff) | |
download | monitoring-plugins-e8bd88d1fcded01ccd066572eeaae1b507989cb3.tar.gz |
Sync with the latest Gnulib code 668c0b8ffa
Diffstat (limited to 'gl/netdb.in.h')
-rw-r--r-- | gl/netdb.in.h | 72 |
1 files changed, 51 insertions, 21 deletions
diff --git a/gl/netdb.in.h b/gl/netdb.in.h index 0da1800..9549cd7 100644 --- a/gl/netdb.in.h +++ b/gl/netdb.in.h | |||
@@ -1,19 +1,19 @@ | |||
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-2013 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2023 Free Software Foundation, Inc. |
3 | Written by Simon Josefsson. | 3 | Written by Simon Josefsson. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU Lesser General Public License as |
7 | the Free Software Foundation; either version 3, or (at your option) | 7 | published by the Free Software Foundation; either version 2.1 of the |
8 | any later version. | 8 | License, or (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This file is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
16 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17 | 17 | ||
18 | /* This file is supposed to be used on platforms that lack <netdb.h>. | 18 | /* This file is supposed to be used on platforms that lack <netdb.h>. |
19 | It is intended to provide definitions and prototypes needed by an | 19 | It is intended to provide definitions and prototypes needed by an |
@@ -158,33 +158,61 @@ struct addrinfo | |||
158 | # endif | 158 | # endif |
159 | # endif | 159 | # endif |
160 | 160 | ||
161 | # if !@HAVE_DECL_GETADDRINFO@ | ||
162 | /* Translate name of a service location and/or a service name to set of | 161 | /* Translate name of a service location and/or a service name to set of |
163 | socket addresses. | 162 | socket addresses. |
164 | For more details, see the POSIX:2001 specification | 163 | For more details, see the POSIX:2008 specification |
165 | <http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */ | 164 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html>. */ |
165 | # if @REPLACE_GETADDRINFO@ | ||
166 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
167 | # undef getaddrinfo | ||
168 | # define getaddrinfo rpl_getaddrinfo | ||
169 | # endif | ||
170 | _GL_FUNCDECL_RPL (getaddrinfo, int, | ||
171 | (const char *restrict nodename, | ||
172 | const char *restrict servname, | ||
173 | const struct addrinfo *restrict hints, | ||
174 | struct addrinfo **restrict res) | ||
175 | _GL_ARG_NONNULL ((4))); | ||
176 | _GL_CXXALIAS_RPL (getaddrinfo, int, | ||
177 | (const char *restrict nodename, | ||
178 | const char *restrict servname, | ||
179 | const struct addrinfo *restrict hints, | ||
180 | struct addrinfo **restrict res)); | ||
181 | # else | ||
182 | # if !@HAVE_DECL_GETADDRINFO@ | ||
166 | _GL_FUNCDECL_SYS (getaddrinfo, int, | 183 | _GL_FUNCDECL_SYS (getaddrinfo, int, |
167 | (const char *restrict nodename, | 184 | (const char *restrict nodename, |
168 | const char *restrict servname, | 185 | const char *restrict servname, |
169 | const struct addrinfo *restrict hints, | 186 | const struct addrinfo *restrict hints, |
170 | struct addrinfo **restrict res) | 187 | struct addrinfo **restrict res) |
171 | _GL_ARG_NONNULL ((4))); | 188 | _GL_ARG_NONNULL ((4))); |
172 | # endif | 189 | # endif |
173 | _GL_CXXALIAS_SYS (getaddrinfo, int, | 190 | _GL_CXXALIAS_SYS (getaddrinfo, int, |
174 | (const char *restrict nodename, | 191 | (const char *restrict nodename, |
175 | const char *restrict servname, | 192 | const char *restrict servname, |
176 | const struct addrinfo *restrict hints, | 193 | const struct addrinfo *restrict hints, |
177 | struct addrinfo **restrict res)); | 194 | struct addrinfo **restrict res)); |
195 | # endif | ||
178 | _GL_CXXALIASWARN (getaddrinfo); | 196 | _GL_CXXALIASWARN (getaddrinfo); |
179 | 197 | ||
180 | # if !@HAVE_DECL_FREEADDRINFO@ | ||
181 | /* Free 'addrinfo' structure AI including associated storage. | 198 | /* Free 'addrinfo' structure AI including associated storage. |
182 | For more details, see the POSIX:2001 specification | 199 | For more details, see the POSIX:2008 specification |
183 | <http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */ | 200 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html>. */ |
201 | # if @REPLACE_GETADDRINFO@ | ||
202 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
203 | # undef freeaddrinfo | ||
204 | # define freeaddrinfo rpl_freeaddrinfo | ||
205 | # endif | ||
206 | _GL_FUNCDECL_RPL (freeaddrinfo, void, (struct addrinfo *ai) | ||
207 | _GL_ARG_NONNULL ((1))); | ||
208 | _GL_CXXALIAS_RPL (freeaddrinfo, void, (struct addrinfo *ai)); | ||
209 | # else | ||
210 | # if !@HAVE_DECL_FREEADDRINFO@ | ||
184 | _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai) | 211 | _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai) |
185 | _GL_ARG_NONNULL ((1))); | 212 | _GL_ARG_NONNULL ((1))); |
186 | # endif | 213 | # endif |
187 | _GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai)); | 214 | _GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai)); |
215 | # endif | ||
188 | _GL_CXXALIASWARN (freeaddrinfo); | 216 | _GL_CXXALIASWARN (freeaddrinfo); |
189 | 217 | ||
190 | # if @REPLACE_GAI_STRERROR@ | 218 | # if @REPLACE_GAI_STRERROR@ |
@@ -197,18 +225,20 @@ _GL_CXXALIAS_RPL (gai_strerror, const char *, (int ecode)); | |||
197 | # else | 225 | # else |
198 | # if !@HAVE_DECL_GAI_STRERROR@ | 226 | # if !@HAVE_DECL_GAI_STRERROR@ |
199 | /* Convert error return from getaddrinfo() to a string. | 227 | /* Convert error return from getaddrinfo() to a string. |
200 | For more details, see the POSIX:2001 specification | 228 | For more details, see the POSIX:2008 specification |
201 | <http://www.opengroup.org/susv3xsh/gai_strerror.html>. */ | 229 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gai_strerror.html>. */ |
202 | _GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode)); | 230 | _GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode)); |
203 | # endif | 231 | # endif |
204 | _GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode)); | 232 | _GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode)); |
205 | # endif | 233 | # endif |
234 | # if __GLIBC__ >= 2 | ||
206 | _GL_CXXALIASWARN (gai_strerror); | 235 | _GL_CXXALIASWARN (gai_strerror); |
236 | # endif | ||
207 | 237 | ||
208 | # if !@HAVE_DECL_GETNAMEINFO@ | 238 | # if !@HAVE_DECL_GETNAMEINFO@ |
209 | /* Convert socket address to printable node and service names. | 239 | /* Convert socket address to printable node and service names. |
210 | For more details, see the POSIX:2001 specification | 240 | For more details, see the POSIX:2008 specification |
211 | <http://www.opengroup.org/susv3xsh/getnameinfo.html>. */ | 241 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html>. */ |
212 | _GL_FUNCDECL_SYS (getnameinfo, int, | 242 | _GL_FUNCDECL_SYS (getnameinfo, int, |
213 | (const struct sockaddr *restrict sa, socklen_t salen, | 243 | (const struct sockaddr *restrict sa, socklen_t salen, |
214 | char *restrict node, socklen_t nodelen, | 244 | char *restrict node, socklen_t nodelen, |