Hash :
895d4925
Author :
Date :
2011-09-24T02:48:19
close: Support for MSVC 9. * lib/close.c: Include <errno.h>, msvc-inval.h. (close_nothrow): New function. (rpl_close): Use it. * m4/close.m4 (gl_FUNC_CLOSE): Replace close if the platform has an invalid parameter handler. * modules/close (Depends-on): Add msvc-inval. * modules/dup2-tests (Depends-on): Add close. * modules/dup3-tests (Depends-on): Likewise. * modules/fcntl-tests (Depends-on): Likewise. * modules/spawn-pipe-tests (Depends-on): Likewise. * modules/unistd-safer-tests (Depends-on): Likewise. * doc/posix-functions/close.texi: Mention the problem on MSVC.
@node close
@section @code{close}
@findex close
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/close.html}
Gnulib module: close
Portability problems fixed by Gnulib:
@itemize
@item
This function crashes when invoked with invalid arguments on some platforms:
MSVC 9.
@item
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.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
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