From a405fc138596f552581d2011fd6de02d5c8186c4 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 17 Nov 2021 01:05:54 +0100 Subject: Sync with the latest Gnulib code (1a268176f) --- gl/netdb.in.h | 72 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 21 deletions(-) (limited to 'gl/netdb.in.h') diff --git a/gl/netdb.in.h b/gl/netdb.in.h index 0da1800a..eb5c960b 100644 --- a/gl/netdb.in.h +++ b/gl/netdb.in.h @@ -1,19 +1,19 @@ /* Provide a netdb.h header file for systems lacking it (read: MinGW). - Copyright (C) 2008-2013 Free Software Foundation, Inc. + Copyright (C) 2008-2021 Free Software Foundation, Inc. Written by Simon Josefsson. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* This file is supposed to be used on platforms that lack . It is intended to provide definitions and prototypes needed by an @@ -158,33 +158,61 @@ struct addrinfo # endif # endif -# if !@HAVE_DECL_GETADDRINFO@ /* Translate name of a service location and/or a service name to set of socket addresses. - For more details, see the POSIX:2001 specification - . */ + For more details, see the POSIX:2008 specification + . */ +# if @REPLACE_GETADDRINFO@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getaddrinfo +# define getaddrinfo rpl_getaddrinfo +# endif +_GL_FUNCDECL_RPL (getaddrinfo, int, + (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res) + _GL_ARG_NONNULL ((4))); +_GL_CXXALIAS_RPL (getaddrinfo, int, + (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res)); +# else +# if !@HAVE_DECL_GETADDRINFO@ _GL_FUNCDECL_SYS (getaddrinfo, int, (const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict hints, struct addrinfo **restrict res) _GL_ARG_NONNULL ((4))); -# endif +# endif _GL_CXXALIAS_SYS (getaddrinfo, int, (const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict hints, struct addrinfo **restrict res)); +# endif _GL_CXXALIASWARN (getaddrinfo); -# if !@HAVE_DECL_FREEADDRINFO@ /* Free 'addrinfo' structure AI including associated storage. - For more details, see the POSIX:2001 specification - . */ + For more details, see the POSIX:2008 specification + . */ +# if @REPLACE_GETADDRINFO@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freeaddrinfo +# define freeaddrinfo rpl_freeaddrinfo +# endif +_GL_FUNCDECL_RPL (freeaddrinfo, void, (struct addrinfo *ai) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (freeaddrinfo, void, (struct addrinfo *ai)); +# else +# if !@HAVE_DECL_FREEADDRINFO@ _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai)); +# endif _GL_CXXALIASWARN (freeaddrinfo); # if @REPLACE_GAI_STRERROR@ @@ -197,18 +225,20 @@ _GL_CXXALIAS_RPL (gai_strerror, const char *, (int ecode)); # else # if !@HAVE_DECL_GAI_STRERROR@ /* Convert error return from getaddrinfo() to a string. - For more details, see the POSIX:2001 specification - . */ + For more details, see the POSIX:2008 specification + . */ _GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode)); # endif _GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (gai_strerror); +# endif # if !@HAVE_DECL_GETNAMEINFO@ /* Convert socket address to printable node and service names. - For more details, see the POSIX:2001 specification - . */ + For more details, see the POSIX:2008 specification + . */ _GL_FUNCDECL_SYS (getnameinfo, int, (const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, -- cgit v1.2.3-74-g34f1