* 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.
This commit is contained in:
Corinna Vinschen
2006-01-29 12:23:44 +00:00
parent 74d3f96faa
commit 5369605f4f
6 changed files with 69 additions and 16 deletions

View File

@@ -66,6 +66,7 @@ struct wincaps
unsigned has_working_virtual_lock : 1;
unsigned has_disabled_user_tos_setting : 1;
unsigned has_fileid_dirinfo : 1;
unsigned has_exclusiveaddruse : 1;
};
class wincapc
@@ -138,6 +139,7 @@ public:
bool IMPLEMENT (has_working_virtual_lock)
bool IMPLEMENT (has_disabled_user_tos_setting)
bool IMPLEMENT (has_fileid_dirinfo)
bool IMPLEMENT (has_exclusiveaddruse)
#undef IMPLEMENT
};