X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fnetdb.in.h;h=efbf7b4bc9a60272488ca42e9ddffa5df5b221a0;hb=e53e23a012113952499a70115d2ca26b2a33e2bf;hp=2edd98bd26724e4179af8984dd7ba67a5e61eceb;hpb=6078aa42b957125a74ba72092d932eb730c10caf;p=gnulib.git diff --git a/lib/netdb.in.h b/lib/netdb.in.h index 2edd98bd2..efbf7b4bc 100644 --- a/lib/netdb.in.h +++ b/lib/netdb.in.h @@ -22,11 +22,12 @@ #ifndef _GL_NETDB_H -#if @HAVE_NETDB_H@ - -# if __GNUC__ >= 3 +#if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ -# endif +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_NETDB_H@ /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_NETDB_H@ @@ -41,6 +42,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. */ @@ -171,10 +174,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 +189,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 */