Hello,
 I've noticed that some systems define AF_LOCAL in sys/socket.h while
others AF_UNIX and most define both. Could gnulib provide both
definitions (e.g. by this patch) to simplify their usage on various
platforms?

regards,
Nikos
diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h
index c9157d3..0a0d1cc 100644
--- a/lib/sys_socket.in.h
+++ b/lib/sys_socket.in.h
@@ -128,6 +128,13 @@ struct sockaddr_storage
 #  define SHUT_RDWR 2
 # endif
 
+# if !defined AF_UNIX
+#  define AF_UNIX AF_LOCAL
+# endif
+# if !defined AF_LOCAL
+#  define AF_LOCAL AF_UNIX
+# endif
+
 #else
 
 # ifdef __CYGWIN__
@@ -169,6 +176,10 @@ struct sockaddr_storage
 #  define SHUT_RDWR SD_BOTH
 # endif
 
+# if !defined AF_UNIX
+#  define AF_UNIX AF_LOCAL
+# endif
+
 # if @HAVE_WINSOCK2_H@
 /* Include headers needed by the emulation code.  */
 #  include <sys/types.h>

Reply via email to