* wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
[gnulib.git] / lib / inet_ntop.h
index 6a92133..69c838d 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert internet address from internal to printable, presentable format.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
    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
@@ -17,8 +17,9 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
 
 /* Converts an internet address from internal format to a printable,
    presentable format.
@@ -36,6 +37,7 @@
    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