autoupdate
[gnulib.git] / lib / inet_ntop.h
index 718a623..83f5edf 100644 (file)
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
 
 /* Converts an internet address from internal format to a printable,
    presentable format.
    DST is returned.  If an error occurs, the return value is NULL and
    errno is set.  If CNT bytes are not sufficient to hold the result,
    the return value is NULL and errno is set to ENOSPC.  A good value
-   for CNT is 46.  */
+   for CNT is 46.
+
+   For more details, see the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/inet_ntop.html>.  */
 
-#if !HAVE_INET_NTOP /* not already defined and declared in <arpa/inet.h> ? */
-extern const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
+#if !HAVE_DECL_INET_NTOP
+extern const char *inet_ntop (int af, const void *restrict src,
+                             char *restrict dst, socklen_t cnt);
 #endif