aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/wincap.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-02-28 13:11:50 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-02-28 13:11:50 +0000
commit496337c9a58d7b107ab2a6dfdd25347479cfaa37 (patch)
treebc27563b72a99bfcbe1ae73621c08c220a58ee00 /winsup/cygwin/wincap.cc
parent882a0c85075ac08baff8d04bad904a88388a02f0 (diff)
downloadnewlib-496337c9a58d7b107ab2a6dfdd25347479cfaa37.zip
newlib-496337c9a58d7b107ab2a6dfdd25347479cfaa37.tar.gz
newlib-496337c9a58d7b107ab2a6dfdd25347479cfaa37.tar.bz2
* fhandler.h (class fhandler_socket): Declare new method
set_socketpair_eids. * fhandler_socket.cc (fhandler_socket::set_socketpair_eids): New method. (fhandler_socket::dup): Duplicate sec_pipe if necessary. (fhandler_socket::listen): Only create sec_pipe if named pipes are available. Initialized sec_peer_pid to 0 as on Linux. (fhandler_socket::connect): Only run eid credential transaction if named pipes are available. Fake otherwise. Initialized sec_peer_pid to 0 as on Linux. (fhandler_socket::accept): Ditto. (fhandler_socket::close): Move closing sec_pipe handle from here... (fhandler_socket::~fhandler_socket): ... to here. * net.cc (socketpair): Set eid credentials by calling fhandler_socket::set_socketpair_eids() on both socket ends. * wincap.h (wincaps::has_named_pipes): New element. * wincap.cc: Implement above element throughout.
Diffstat (limited to 'winsup/cygwin/wincap.cc')
-rw-r--r--winsup/cygwin/wincap.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index 4011b5d..9a790b0 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -42,6 +42,7 @@ static NO_COPY wincaps wincap_unknown = {
has_move_file_ex:false,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:false,
has_try_enter_critical_section:false,
has_raw_devices:false,
has_valid_processorlevel:false,
@@ -90,6 +91,7 @@ static NO_COPY wincaps wincap_95 = {
has_move_file_ex:false,
has_negative_pids:true,
has_unreliable_pipes:true,
+ has_named_pipes:false,
has_try_enter_critical_section:false,
has_raw_devices:false,
has_valid_processorlevel:false,
@@ -138,6 +140,7 @@ static NO_COPY wincaps wincap_95osr2 = {
has_move_file_ex:false,
has_negative_pids:true,
has_unreliable_pipes:true,
+ has_named_pipes:false,
has_try_enter_critical_section:false,
has_raw_devices:false,
has_valid_processorlevel:false,
@@ -186,6 +189,7 @@ static NO_COPY wincaps wincap_98 = {
has_move_file_ex:false,
has_negative_pids:true,
has_unreliable_pipes:true,
+ has_named_pipes:false,
has_try_enter_critical_section:false,
has_raw_devices:false,
has_valid_processorlevel:true,
@@ -234,6 +238,7 @@ static NO_COPY wincaps wincap_98se = {
has_move_file_ex:false,
has_negative_pids:true,
has_unreliable_pipes:true,
+ has_named_pipes:false,
has_try_enter_critical_section:false,
has_raw_devices:false,
has_valid_processorlevel:true,
@@ -282,6 +287,7 @@ static NO_COPY wincaps wincap_me = {
has_move_file_ex:false,
has_negative_pids:true,
has_unreliable_pipes:true,
+ has_named_pipes:false,
has_try_enter_critical_section:false,
has_raw_devices:false,
has_valid_processorlevel:true,
@@ -330,6 +336,7 @@ static NO_COPY wincaps wincap_nt3 = {
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:true,
has_try_enter_critical_section:false,
has_raw_devices:true,
has_valid_processorlevel:true,
@@ -378,6 +385,7 @@ static NO_COPY wincaps wincap_nt4 = {
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:true,
has_try_enter_critical_section:true,
has_raw_devices:true,
has_valid_processorlevel:true,
@@ -426,6 +434,7 @@ static NO_COPY wincaps wincap_nt4sp4 = {
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:true,
has_try_enter_critical_section:true,
has_raw_devices:true,
has_valid_processorlevel:true,
@@ -474,6 +483,7 @@ static NO_COPY wincaps wincap_2000 = {
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:true,
has_try_enter_critical_section:true,
has_raw_devices:true,
has_valid_processorlevel:true,
@@ -522,6 +532,7 @@ static NO_COPY wincaps wincap_xp = {
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:true,
has_try_enter_critical_section:true,
has_raw_devices:true,
has_valid_processorlevel:true,
@@ -570,6 +581,7 @@ static NO_COPY wincaps wincap_2003 = {
has_move_file_ex:true,
has_negative_pids:false,
has_unreliable_pipes:false,
+ has_named_pipes:true,
has_try_enter_critical_section:true,
has_raw_devices:true,
has_valid_processorlevel:true,