Mercurial > hg > octave-lyh > gnulib-hg
changeset 10693:7e747af65b38
Cleanup and simplify winsock split changes.
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 21 Oct 2008 17:15:43 +0200 |
parents | b867b19bccb3 |
children | b2b4c17db720 |
files | ChangeLog doc/posix-functions/close.texi doc/posix-functions/ioctl.texi lib/close.c lib/ioctl.c lib/socket.c lib/sys_socket.in.h m4/sys_socket_h.m4 |
diffstat | 8 files changed, 23 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +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>.
--- a/doc/posix-functions/close.texi +++ b/doc/posix-functions/close.texi @@ -12,10 +12,6 @@ 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:
--- a/doc/posix-functions/ioctl.texi +++ b/doc/posix-functions/ioctl.texi @@ -9,11 +9,9 @@ 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:
--- a/lib/close.c +++ b/lib/close.c @@ -29,7 +29,7 @@ /* 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);
--- a/lib/ioctl.c +++ b/lib/ioctl.c @@ -28,8 +28,6 @@ /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" -#undef ioctl - int rpl_ioctl (int fd, int req, ...) {
--- a/lib/socket.c +++ b/lib/socket.c @@ -26,8 +26,6 @@ /* Get set_winsock_errno, FD_TO_SOCKET etc. */ #include "w32sock.h" -#undef socket - int rpl_socket (int domain, int type, int protocol) {
--- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -389,9 +389,8 @@ # 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
--- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -96,7 +96,6 @@ 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],