Simplification.
* lib/sys_socket.in.h (_gl_close_fd_maybe_socket): Remove declaration.
* lib/close.c (_gl_close_fd_maybe_socket): Make static.
Simplification.
* lib/ioctl.c (ioctl): Don't undefine.
* lib/socket.c (socket): Don't undefine.
Remove unused module indicator macros.
* m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Don't define
GNULIB_$1 as a C macro.
* doc/posix-functions/close.texi: Undo last change.
* doc/posix-functions/ioctl.texi: Merge the two paragraphs about
Windows platforms.
+2008-10-21 Bruno Haible <bruno@clisp.org>
+
+ Simplification.
+ * lib/sys_socket.in.h (_gl_close_fd_maybe_socket): Remove declaration.
+ * lib/close.c (_gl_close_fd_maybe_socket): Make static.
+
+ Simplification.
+ * lib/ioctl.c (ioctl): Don't undefine.
+ * lib/socket.c (socket): Don't undefine.
+
+ Remove unused module indicator macros.
+ * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Don't define
+ GNULIB_$1 as a C macro.
+
+ * doc/posix-functions/close.texi: Undo last change.
+ * doc/posix-functions/ioctl.texi: Merge the two paragraphs about
+ Windows platforms.
+
2008-10-21 Bruno Haible <bruno@clisp.org>
Add gethostname() declaration to <unistd.h>.
On Windows platforms (excluding Cygwin), @code{socket} and @code{accept}
do not return file descriptors that can be closed by @code{close}.
Instead, @code{closesocket} must be used.
-@item
-On Windows platforms (excluding Cygwin), error codes for @code{close}
-are not placed in @code{errno}, and @code{WSAGetLastError} must be
-used instead.
@end itemize
Portability problems not fixed by Gnulib:
Portability problems fixed by Gnulib:
@itemize
@item
-On Windows platforms (excluding Cygwin), error codes for @code{ioctl}
-are not placed in @code{errno}, and @code{WSAGetLastError} must be
-used instead.
-@item
-@code{ioctl} is called @code{ioctlsocket} under mingw
+On Windows platforms (excluding Cygwin), @code{ioctl} is called
+@code{ioctlsocket}, and error codes for this function are not placed in
+@code{errno}, and @code{WSAGetLastError} must be used instead.
@end itemize
Portability problems not fixed by Gnulib:
/* Get set_winsock_errno, FD_TO_SOCKET etc. */
#include "w32sock.h"
-int
+static int
_gl_close_fd_maybe_socket (int fd)
{
SOCKET sock = FD_TO_SOCKET (fd);
/* Get set_winsock_errno, FD_TO_SOCKET etc. */
#include "w32sock.h"
-#undef ioctl
-
int
rpl_ioctl (int fd, int req, ...)
{
/* Get set_winsock_errno, FD_TO_SOCKET etc. */
#include "w32sock.h"
-#undef socket
-
int
rpl_socket (int domain, int type, int protocol)
{
# endif
# if @GNULIB_CLOSE@ && @HAVE_WINSOCK2_H@
-/* gnulib internal function. */
+/* Need a gnulib internal function. */
# define HAVE__GL_CLOSE_FD_MAYBE_SOCKET 1
-extern int _gl_close_fd_maybe_socket (int fd);
# endif
# ifdef __cplusplus
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
- gl_MODULE_INDICATOR([$1])
])
AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],