summaryrefslogtreecommitdiff
path: root/lib/sys_socket.in.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-06-16 18:22:50 +0200
committerAndy Wingo <wingo@pobox.com>2011-06-16 19:47:25 +0200
commit3d458a81c64e4696157b23c7c4c4c150aa4a93b8 (patch)
tree1478fb3a9faaf203f517a8776f54d00884efdef6 /lib/sys_socket.in.h
parent0b77014f0c7d53b8bdbc7059c92f526560e1cacd (diff)
downloadguile-3d458a81c64e4696157b23c7c4c4c150aa4a93b8.tar.gz
gnulib update
Added pipe2 and open modules, to get O_CLOEXEC. * libguile/Makefile.am (guile_filter_doc_snarfage$(EXEEXT)): Add gnulib here, in the native build case, for rpl_fflush if needed. foo
Diffstat (limited to 'lib/sys_socket.in.h')
-rw-r--r--lib/sys_socket.in.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h
index c13f33663..d04357c0a 100644
--- a/lib/sys_socket.in.h
+++ b/lib/sys_socket.in.h
@@ -40,7 +40,7 @@
#else
/* Normal invocation convention. */
-#ifndef _GL_SYS_SOCKET_H
+#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
#if @HAVE_SYS_SOCKET_H@
@@ -61,8 +61,8 @@
#endif
-#ifndef _GL_SYS_SOCKET_H
-#define _GL_SYS_SOCKET_H
+#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
+#define _@GUARD_PREFIX@_SYS_SOCKET_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -108,6 +108,12 @@ struct sockaddr_storage
#endif
+/* Get struct iovec. */
+/* But avoid namespace pollution on glibc systems. */
+#if ! defined __GLIBC__
+# include <sys/uio.h>
+#endif
+
#if @HAVE_SYS_SOCKET_H@
/* A platform that has <sys/socket.h>. */
@@ -176,9 +182,6 @@ typedef int socklen_t;
# endif
-/* For struct iovec */
-# include <sys/uio.h>
-
/* Rudimentary 'struct msghdr'; this works as long as you don't try to
access msg_control or msg_controllen. */
struct msghdr {
@@ -221,7 +224,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
/* Wrap everything else to use libc file descriptors for sockets. */
-#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
+#if @HAVE_WINSOCK2_H@ && !defined _@GUARD_PREFIX@_UNISTD_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef close
# define close close_used_without_including_unistd_h
@@ -231,7 +234,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
# endif
#endif
-#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
+#if @HAVE_WINSOCK2_H@ && !defined _@GUARD_PREFIX@_UNISTD_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gethostname
# define gethostname gethostname_used_without_including_unistd_h
@@ -673,6 +676,6 @@ _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
# endif
#endif
-#endif /* _GL_SYS_SOCKET_H */
-#endif /* _GL_SYS_SOCKET_H */
+#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
+#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
#endif