projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* doc/gnulib-readme.texi (Portability guidelines): ctype.h, not ctime.h.
[gnulib.git]
/
lib
/
accept4.c
diff --git
a/lib/accept4.c
b/lib/accept4.c
index
9e89d2a
..
018ddfc
100644
(file)
--- a/
lib/accept4.c
+++ b/
lib/accept4.c
@@
-1,5
+1,5
@@
/* Accept a connection on a socket, with specific opening flags.
/* Accept a connection on a socket, with specific opening flags.
- Copyright (C) 2009
, 2010
Free Software Foundation, Inc.
+ Copyright (C) 2009
-2012
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-12,8
+12,7
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <config.h>
@@
-23,6
+22,7
@@
#include <errno.h>
#include <fcntl.h>
#include "binary-io.h"
#include <errno.h>
#include <fcntl.h>
#include "binary-io.h"
+#include "msvc-nothrow.h"
#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
@@
-66,7
+66,7
@@
accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)
#if SOCK_CLOEXEC
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if SOCK_CLOEXEC
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native W
oe32
API. */
+/* Native W
indows
API. */
if (flags & SOCK_CLOEXEC)
{
HANDLE curr_process = GetCurrentProcess ();
if (flags & SOCK_CLOEXEC)
{
HANDLE curr_process = GetCurrentProcess ();
@@
-90,7
+90,7
@@
accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)
/* Closing fd before allocating the new fd ensures that the new fd will
have the minimum possible value. */
close (fd);
/* Closing fd before allocating the new fd ensures that the new fd will
have the minimum possible value. */
close (fd);
- nfd = _open_osfhandle ((
long
) new_handle,
+ nfd = _open_osfhandle ((
intptr_t
) new_handle,
O_NOINHERIT | (flags & (O_TEXT | O_BINARY)));
if (nfd < 0)
{
O_NOINHERIT | (flags & (O_TEXT | O_BINARY)));
if (nfd < 0)
{