summaryrefslogtreecommitdiff
path: root/lib/sys_socket.in.h
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2008-10-10 00:23:06 +0200
committerBruno Haible <bruno@clisp.org>2008-10-10 00:25:23 +0200
commit59a539f3e601f4639e67d9a6d2a20c9450e642f4 (patch)
treea36c6925790f4f9fc8c14fb7222300cea80c0522 /lib/sys_socket.in.h
parentd638ad2325cc24731a6deda2cb8d530d1c380a3a (diff)
downloadgnulib-59a539f3e601f4639e67d9a6d2a20c9450e642f4.tar.gz
Combine the two replacements of 'close'.
Diffstat (limited to 'lib/sys_socket.in.h')
-rw-r--r--lib/sys_socket.in.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h
index 13729c6467..74cb37a98f 100644
--- a/lib/sys_socket.in.h
+++ b/lib/sys_socket.in.h
@@ -138,10 +138,9 @@ rpl_fd_isset (int fd, fd_set * set)
/* Wrap everything else to use libc file descriptors for sockets. */
-# if @HAVE_WINSOCK2_H@
+# if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
# undef close
-# define close rpl_close
-extern int rpl_close(int);
+# define close close_used_without_including_unistd_h
# endif
# if @GNULIB_SOCKET@
@@ -376,6 +375,12 @@ extern int rpl_setsockopt (int, int, int, const void *, int);
# define select select_used_without_including_sys_select_h
# endif
+# if @GNULIB_CLOSE@ && @HAVE_WINSOCK2_H@
+/* gnulib internal function. */
+# define HAVE__GL_CLOSE_FD_MAYBE_SOCKET 1
+extern int _gl_close_fd_maybe_socket (int fd);
+# endif
+
# ifdef __cplusplus
}
# endif