X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Faccept4.c;h=018ddfca4767ee4502a9cbae7fb7bea55e5282a4;hb=f62a2da1390a78aebe7dcbc5753ba7a2b34cf1fd;hp=1e7e7f4521db224e1d0ec36a3b6aa6be12facd33;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git
diff --git a/lib/accept4.c b/lib/accept4.c
index 1e7e7f452..018ddfca4 100644
--- a/lib/accept4.c
+++ b/lib/accept4.c
@@ -1,5 +1,5 @@
/* Accept a connection on a socket, with specific opening flags.
- Copyright (C) 2009-2011 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
@@ -12,8 +12,7 @@
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 . */
#include
@@ -23,6 +22,7 @@
#include
#include
#include "binary-io.h"
+#include "msvc-nothrow.h"
#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__
-/* Native Woe32 API. */
+/* Native Windows API. */
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);
- nfd = _open_osfhandle ((long) new_handle,
+ nfd = _open_osfhandle ((intptr_t) new_handle,
O_NOINHERIT | (flags & (O_TEXT | O_BINARY)));
if (nfd < 0)
{