summaryrefslogtreecommitdiff
path: root/gl/sys_socket.in.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2011-08-03 01:16:03 +0200
committerSimon Josefsson <simon@josefsson.org>2011-08-03 01:54:47 +0200
commitae155d81b9b0282e1fe2fdfc18f3bfa3ec6a5074 (patch)
treee66003dc5af9746fbe3b652414362cc704bc6de8 /gl/sys_socket.in.h
parent5ca16d756ababb14e31d09ac4f1c1514de2ff5b9 (diff)
downloadgnutls-ae155d81b9b0282e1fe2fdfc18f3bfa3ec6a5074.tar.gz
Update gnulib files. Fix syntax-check usage.
Diffstat (limited to 'gl/sys_socket.in.h')
-rw-r--r--gl/sys_socket.in.h66
1 files changed, 34 insertions, 32 deletions
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 2e6af68712..aba28f86f0 100644
--- a/gl/sys_socket.in.h
+++ b/gl/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. */
@@ -194,6 +194,8 @@ struct msghdr {
#endif
+/* Fix some definitions from <winsock2.h>. */
+
#if @HAVE_WINSOCK2_H@
# if !GNULIB_defined_rpl_fd_isset
@@ -222,28 +224,38 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
#endif
-/* Wrap everything else to use libc file descriptors for sockets. */
+/* Hide some function declarations from <winsock2.h>. */
-#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef close
-# define close close_used_without_including_unistd_h
-# else
- _GL_WARN_ON_USE (close,
- "close() used without including <unistd.h>");
+#if @HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_UNISTD_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef close
+# define close close_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (close,
+ "close() used without including <unistd.h>");
+# endif
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gethostname
+# define gethostname gethostname_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (gethostname,
+ "gethostname() used without including <unistd.h>");
+# endif
# endif
-#endif
-
-#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gethostname
-# define gethostname gethostname_used_without_including_unistd_h
-# else
- _GL_WARN_ON_USE (gethostname,
- "gethostname() used without including <unistd.h>");
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
+ _GL_WARN_ON_USE (select,
+ "select() used without including <sys/select.h>");
+# endif
# endif
#endif
+/* Wrap everything else to use libc file descriptors for sockets. */
+
#if @GNULIB_SOCKET@
# if @HAVE_WINSOCK2_H@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -633,16 +645,6 @@ _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
# endif
#endif
-#if @HAVE_WINSOCK2_H@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef select
-# define select select_used_without_including_sys_select_h
-# else
- _GL_WARN_ON_USE (select,
- "select() used without including <sys/select.h>");
-# endif
-#endif
-
#if @GNULIB_ACCEPT4@
/* Accept a connection on a socket, with specific opening flags.
The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
@@ -676,6 +678,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