The attached patch updates the documentation on socket functions after the recent Winsock commits.
Ok? Paolo
2008-08-24 Paolo Bonzini <[EMAIL PROTECTED]> * doc/posix-functions/accept.texi: Update mingw problems. * doc/posix-functions/bind.texi: Update mingw problems. * doc/posix-functions/close.texi: Update mingw problems. * doc/posix-functions/connect.texi: Update mingw problems. * doc/posix-functions/getpeername.texi: Update mingw problems. * doc/posix-functions/getsockname.texi: Update mingw problems. * doc/posix-functions/getsockopt.texi: Update mingw problems. * doc/posix-functions/ioctl.texi: Update mingw problems. * doc/posix-functions/listen.texi: Update mingw problems. * doc/posix-functions/recv.texi: Update mingw problems. * doc/posix-functions/recvfrom.texi: Update mingw problems. * doc/posix-functions/select.texi: Update mingw problems. * doc/posix-functions/send.texi: Update mingw problems. * doc/posix-functions/sendto.texi: Update mingw problems. * doc/posix-functions/setsockopt.texi: Update mingw problems. * doc/posix-functions/socket.texi: Update mingw problems. diff --git a/doc/posix-functions/accept.texi b/doc/posix-functions/accept.texi index fe85c63..8c3fa18 100644 --- a/doc/posix-functions/accept.texi +++ b/doc/posix-functions/accept.texi @@ -4,17 +4,25 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/accept.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +On mingw, the descriptors returned by the @code{accept} function can not be used +in calls to @code{read}, @code{write}, and @code{close}; you have to use [EMAIL PROTECTED], @code{send}, @code{closesocket} in these cases instead. [EMAIL PROTECTED] +Error codes for @code{accept} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. +On BeOS, the descriptors returned by the @code{accept} function can not be used +in calls to @code{read}, @code{write}, and @code{close}; you have to use [EMAIL PROTECTED], @code{send}, @code{closesocket} in these cases instead. @item Some platforms don't have a @code{socklen_t} type; in this case this function's third argument type is @samp{int *}. diff --git a/doc/posix-functions/bind.texi b/doc/posix-functions/bind.texi index 2211dd0..270eea3 100644 --- a/doc/posix-functions/bind.texi +++ b/doc/posix-functions/bind.texi @@ -4,15 +4,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/bind.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{bind} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] -This function is missing on some platforms: -mingw. @end itemize diff --git a/doc/posix-functions/close.texi b/doc/posix-functions/close.texi index ec961dc..5d8924c 100644 --- a/doc/posix-functions/close.texi +++ b/doc/posix-functions/close.texi @@ -4,12 +4,20 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/close.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +On mingw, @code{socket} and @code{accept} do not return file descriptors +that can be closed by @code{close}. Instead, @code{closesocket} must be +used. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] +On BeOS, @code{socket} and @code{accept} do not return file descriptors +that can be closed by @code{close}. Instead, @code{closesocket} must be +used. @end itemize diff --git a/doc/posix-functions/connect.texi b/doc/posix-functions/connect.texi index 4987034..2a9bfbf 100644 --- a/doc/posix-functions/connect.texi +++ b/doc/posix-functions/connect.texi @@ -4,15 +4,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/connect.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{connect} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] -This function is missing on some platforms: -mingw. @end itemize diff --git a/doc/posix-functions/getpeername.texi b/doc/posix-functions/getpeername.texi index e229534..61729b4 100644 --- a/doc/posix-functions/getpeername.texi +++ b/doc/posix-functions/getpeername.texi @@ -4,18 +4,18 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/getpeername.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{getpeername} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. [EMAIL PROTECTED] Some platforms don't have a @code{socklen_t} type; in this case this function's third argument type is @samp{int *}. @end itemize diff --git a/doc/posix-functions/getsockname.texi b/doc/posix-functions/getsockname.texi index 0d591e4..ca216c4 100644 --- a/doc/posix-functions/getsockname.texi +++ b/doc/posix-functions/getsockname.texi @@ -4,10 +4,13 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/getsockname.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{getsockname} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: diff --git a/doc/posix-functions/getsockopt.texi b/doc/posix-functions/getsockopt.texi index 583bb90..b2428c3 100644 --- a/doc/posix-functions/getsockopt.texi +++ b/doc/posix-functions/getsockopt.texi @@ -4,17 +4,20 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/getsockopt.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{getsockopt} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize @item This function is missing on some platforms: -mingw, BeOS. +BeOS. @item Some platforms don't have a @code{socklen_t} type; in this case this function's fifth argument type is @samp{int *}. diff --git a/doc/posix-functions/ioctl.texi b/doc/posix-functions/ioctl.texi index 56380a8..77eabaf 100644 --- a/doc/posix-functions/ioctl.texi +++ b/doc/posix-functions/ioctl.texi @@ -4,17 +4,19 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/ioctl.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{ioctl} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. [EMAIL PROTECTED] [EMAIL PROTECTED] is called @code{ioctlsocket} under mingw @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. [EMAIL PROTECTED] Most @code{ioctl} requests are platform and hardware specific. @end itemize diff --git a/doc/posix-functions/listen.texi b/doc/posix-functions/listen.texi index 6ffb36b..e52a4c7 100644 --- a/doc/posix-functions/listen.texi +++ b/doc/posix-functions/listen.texi @@ -4,15 +4,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/listen.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{listen} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] -This function is missing on some platforms: -mingw. @end itemize diff --git a/doc/posix-functions/recv.texi b/doc/posix-functions/recv.texi index 1cebbd4..bae3b87 100644 --- a/doc/posix-functions/recv.texi +++ b/doc/posix-functions/recv.texi @@ -4,15 +4,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/recv.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{recv} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] -This function is missing on some platforms: -mingw. @end itemize diff --git a/doc/posix-functions/recvfrom.texi b/doc/posix-functions/recvfrom.texi index fdb54a6..6b1c77b 100644 --- a/doc/posix-functions/recvfrom.texi +++ b/doc/posix-functions/recvfrom.texi @@ -4,18 +4,18 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/recvfrom.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{recvfrom} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. [EMAIL PROTECTED] Some platforms don't have a @code{socklen_t} type; in this case this function's sixth argument type is @samp{int *}. @end itemize diff --git a/doc/posix-functions/select.texi b/doc/posix-functions/select.texi index 1c64752..8b95fb2 100644 --- a/doc/posix-functions/select.texi +++ b/doc/posix-functions/select.texi @@ -4,26 +4,26 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/select.html} -Gnulib module: --- +Gnulib module: sys_select Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +On Windows platforms (excluding Cygwin), @code{select} can only be +called on descriptors created by the @code{socket} function, not on regular +file descriptors. @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. [EMAIL PROTECTED] When you call @code{select} with a timeout, some implementations modify the timeout parameter so that upon return from the function, it contains the amount of time not slept. Other implementations leave the timeout parameter unmodified. @item -On Windows platforms (excluding Cygwin) and on BeOS, @code{select} can only be -called on descriptors created by the @code{socket} function, not on regular -file descriptors. +On BeOS, @code{select} can only be called on descriptors created by the [EMAIL PROTECTED] function, not on regular file descriptors. @item On Linux, when some file descriptor refers to a regular file, @code{select} may fail, setting @code{errno} to @code{EBADF}. diff --git a/doc/posix-functions/send.texi b/doc/posix-functions/send.texi index 2320826..ba22b09 100644 --- a/doc/posix-functions/send.texi +++ b/doc/posix-functions/send.texi @@ -4,15 +4,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/send.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{send} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] -This function is missing on some platforms: -mingw. @end itemize diff --git a/doc/posix-functions/sendto.texi b/doc/posix-functions/sendto.texi index 62330a6..49467d5 100644 --- a/doc/posix-functions/sendto.texi +++ b/doc/posix-functions/sendto.texi @@ -4,15 +4,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/sendto.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{sendto} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize [EMAIL PROTECTED] -This function is missing on some platforms: -mingw. @end itemize diff --git a/doc/posix-functions/setsockopt.texi b/doc/posix-functions/setsockopt.texi index 2146c35..a9f718a 100644 --- a/doc/posix-functions/setsockopt.texi +++ b/doc/posix-functions/setsockopt.texi @@ -4,17 +4,17 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/setsockopt.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +Error codes for @code{setsockopt} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. [EMAIL PROTECTED] Many socket options are not available on all platforms. @end itemize diff --git a/doc/posix-functions/socket.texi b/doc/posix-functions/socket.texi index 46a3605..ddceda1 100644 --- a/doc/posix-functions/socket.texi +++ b/doc/posix-functions/socket.texi @@ -4,18 +4,22 @@ POSIX specification: @url{http://www.opengroup.org/susv3xsh/socket.html} -Gnulib module: --- +Gnulib module: sys_socket Portability problems fixed by Gnulib: @itemize [EMAIL PROTECTED] +On mingw, the descriptors returned by the @code{socket} function can not be used +in calls to @code{read}, @code{write}, and @code{close}; you have to use [EMAIL PROTECTED], @code{send}, @code{closesocket} in these cases instead. [EMAIL PROTECTED] +Error codes for @code{socket} are not placed in @code{errno} under mingw, +and @code{WSAGetLastError} must be used instead. @end itemize Portability problems not fixed by Gnulib: @itemize @item -This function is missing on some platforms: -mingw. [EMAIL PROTECTED] On BeOS, the descriptors returned by the @code{socket} function can not be used in calls to @code{read}, @code{write}, and @code{close}; you have to use @code{recv}, @code{send}, @code{closesocket} in these cases instead.