X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fnetdb.in.h;h=8789550b6eea391b5a639cb409e2edf7abbb70b2;hb=f4c549fab688ce822556eadcf60fdda5042ade11;hp=def9b5f799a06357e6fae35a4ff11514bde3af72;hpb=be51f2652b95b8b7b8778039c012d0c9c70741a0;p=gnulib.git diff --git a/lib/netdb.in.h b/lib/netdb.in.h index def9b5f79..8789550b6 100644 --- a/lib/netdb.in.h +++ b/lib/netdb.in.h @@ -22,11 +22,11 @@ #ifndef _GL_NETDB_H -#if @HAVE_NETDB_H@ - -# if __GNUC__ >= 3 +#if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ -# endif +#endif + +#if @HAVE_NETDB_H@ /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_NETDB_H@ @@ -41,6 +41,8 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ +/* The definition of _GL_WARN_ON_USE is copied here. */ + /* Declarations for a platform that lacks , or where it is incomplete. */ @@ -90,7 +92,7 @@ struct addrinfo # endif # ifndef AI_ADDRCONFIG # define AI_ADDRCONFIG 0 /* 0x0020: Use configuration of this host to choose - returned address type.. */ + returned address type. */ # endif /* Error values for `getaddrinfo' function. */ @@ -171,10 +173,10 @@ extern const char *gai_strerror (int ecode); /* Convert socket address to printable node and service names. For more details, see the POSIX:2001 specification . */ -extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, - char *restrict node, socklen_t nodelen, - char *restrict service, socklen_t servicelen, - int flags) +extern int getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags) _GL_ARG_NONNULL ((1)); # endif @@ -186,7 +188,33 @@ extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, # define NI_NUMERICSERV 2 # endif -#endif /* @GNULIB_GETADDRINFO@ */ +#elif defined GNULIB_POSIXCHECK + +# undef getaddrinfo +# if HAVE_RAW_DECL_GETADDRINFO +_GL_WARN_ON_USE (getaddrinfo, "getaddrinfo is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +# undef freeaddrinfo +# if HAVE_RAW_DECL_FREEADDRINFO +_GL_WARN_ON_USE (freeaddrinfo, "freeaddrinfo is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +# undef gai_strerror +# if HAVE_RAW_DECL_GAI_STRERROR +_GL_WARN_ON_USE (gai_strerror, "gai_strerror is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +# undef getnameinfo +# if HAVE_RAW_DECL_GETNAMEINFO +_GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +#endif #endif /* _GL_NETDB_H */ #endif /* _GL_NETDB_H */