diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-01-29 12:23:44 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-01-29 12:23:44 +0000 |
commit | 5369605f4f7a8275f47e695856d42dc39bcbd3e3 (patch) | |
tree | b09aa426d96850b857d08f5ba13069c60e473101 /winsup/cygwin/fhandler.h | |
parent | 74d3f96faa7a547c4b9ebcfab3d3a850b0389202 (diff) | |
download | cygnal-5369605f4f7a8275f47e695856d42dc39bcbd3e3.tar.gz cygnal-5369605f4f7a8275f47e695856d42dc39bcbd3e3.tar.bz2 cygnal-5369605f4f7a8275f47e695856d42dc39bcbd3e3.zip |
* fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
* fhandler_socket.cc (fhandler_socket::bind): Set socket to
SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
* net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
if SO_REUSEADDR socket option has been successsfully set.
* wincap.h (wincaps::has_exclusiveaddruse): New element.
* wincap.cc: Implement above element throughout.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 82152019b..37b7699c8 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -417,6 +417,7 @@ class fhandler_socket: public fhandler_base unsigned async_io : 1; /* async I/O */ unsigned saw_shutdown_read : 1; /* Socket saw a SHUT_RD */ unsigned saw_shutdown_write : 1; /* Socket saw a SHUT_WR */ + unsigned saw_reuseaddr : 1; /* Socket saw SO_REUSEADDR call */ unsigned closed : 1; unsigned owner : 1; unsigned connect_state : 2; @@ -440,6 +441,7 @@ class fhandler_socket: public fhandler_base IMPLEMENT_STATUS_FLAG (bool, async_io) IMPLEMENT_STATUS_FLAG (bool, saw_shutdown_read) IMPLEMENT_STATUS_FLAG (bool, saw_shutdown_write) + IMPLEMENT_STATUS_FLAG (bool, saw_reuseaddr) IMPLEMENT_STATUS_FLAG (bool, closed) IMPLEMENT_STATUS_FLAG (bool, owner) IMPLEMENT_STATUS_FLAG (conn_state, connect_state) |