* fhandler.h (fhandler_socket::wait_for_events): Take additional
parameter "dontwait". * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the socket is non-blocking if dontwait is true. (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to set the wait_for_events dontwait parameter. (fhandler_socket::send_internal): Ditto. Optimize code slightly. * include/cygwin/socket.h (MSG_DONTWAIT): Define. * include/cygwin/version.h: Bump API minor number.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* cygwin/socket.h
|
||||
|
||||
Copyright 1999, 2000, 2001, 2005, 2006, 2007 Red Hat, Inc.
|
||||
Copyright 1999, 2000, 2001, 2005, 2006, 2007, 2009 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -191,6 +191,7 @@ struct OLD_msghdr
|
||||
#define MSG_PEEK 0x2 /* peek at incoming message */
|
||||
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
|
||||
#define MSG_WAITALL 0x8 /* wait for all requested bytes */
|
||||
#define MSG_DONTWAIT 0x10 /* selective non-blocking operation */
|
||||
#define MSG_NOSIGNAL 0x20 /* Don't raise SIGPIPE */
|
||||
#define MSG_TRUNC 0x0100 /* Normal data truncated */
|
||||
#define MSG_CTRUNC 0x0200 /* Control data truncated */
|
||||
|
@@ -352,12 +352,13 @@ details. */
|
||||
201: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf.
|
||||
202: Export gethostbyname2.
|
||||
203: Export wcsftime.
|
||||
204: recv/send flag MSG_DONTWAIT added.
|
||||
*/
|
||||
|
||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 203
|
||||
#define CYGWIN_VERSION_API_MINOR 204
|
||||
|
||||
/* There is also a compatibity version number associated with the
|
||||
shared memory regions. It is incremented when incompatible
|
||||
|
Reference in New Issue
Block a user