From b79f85c28b63ccc3326ac78654c8171c3f8a5706 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 9 Apr 2004 08:43:29 +0000 Subject: * fhandler.cc (fhandler_base::write): Use bool parameter in calls to set_did_lseek. (fhandler_base::fhandler_base): Accomodate new status and open_status constructor. * fhandler.h: Remove status bit enumerator. (FHDEVN): Remove. (FHISSETF): Remove. (FHSETF): Remove. (FHCLEARF): Remove. (FHCONDSETF): Remove. (FHSTATOFF): Remove. (UNCONNECTED, CONNECT_PENDING, CONNECTED): Substitute by enum connect_state. (fhandler_base::status): Define as bitfield struct type status_flags. Remove unused flags entirely. Accomodate all status access methods. (open_status): Define as bitfield struct type status_flags. (fhandler_socket): Move socket related status bits to here. Redefine had_connect_or_listen to be part of these status bits. Accomodate related access methods. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Use pc.issymlink instead of dropped method get_symlink_p. (fhandler_base::open_fs): Remove setting dropped status flags. * fhandler_socket.cc: Use values from enum connect_state throughout. (fhandler_socket::fhandler_socket): Initialize status bits. * fhandler_virtual.cc (fhandler_virtual::open): Remove setting dropped status flags. * net.cc: Use values from enum connect_state throughout. * select.cc: Ditto. * shared_info.h: Protect struct console_state using _FHANDLER_H_ instead of FHDEVN. --- winsup/cygwin/net.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index c0c5b84c6..0d2608d77 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1960,7 +1960,7 @@ cygwin_rcmd (char **ahost, unsigned short inport, char *locuser, if (res_fd >= 0 && fdsock (res_fd, tcp_dev, res)) { - ((fhandler_socket *) res_fd)->set_connect_state (CONNECTED); + ((fhandler_socket *) res_fd)->set_connect_state (connected); res = res_fd; } else @@ -1977,7 +1977,7 @@ cygwin_rcmd (char **ahost, unsigned short inport, char *locuser, if (newfd >= 0 && fdsock (newfd, tcp_dev, fd2s)) { *fd2p = newfd; - ((fhandler_socket *) fd2p)->set_connect_state (CONNECTED); + ((fhandler_socket *) fd2p)->set_connect_state (connected); } else { @@ -2040,7 +2040,7 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser, if (res_fd >= 0 && fdsock (res_fd, tcp_dev, res)) { - ((fhandler_socket *) res_fd)->set_connect_state (CONNECTED); + ((fhandler_socket *) res_fd)->set_connect_state (connected); res = res_fd; } else @@ -2056,7 +2056,7 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser, if (newfd >= 0 && fdsock (newfd, tcp_dev, fd2s)) { - ((fhandler_socket *) fd2p)->set_connect_state (CONNECTED); + ((fhandler_socket *) fd2p)->set_connect_state (connected); *fd2p = newfd; } else @@ -2230,7 +2230,7 @@ socketpair (int family, int type, int protocol, int *sb) ((fhandler_socket *) sb0)->set_sun_path (""); ((fhandler_socket *) sb0)->set_addr_family (family); ((fhandler_socket *) sb0)->set_socket_type (type); - ((fhandler_socket *) sb0)->set_connect_state (CONNECTED); + ((fhandler_socket *) sb0)->set_connect_state (connected); cygheap_fdnew sb1 (sb0, false); @@ -2239,7 +2239,7 @@ socketpair (int family, int type, int protocol, int *sb) ((fhandler_socket *) sb1)->set_sun_path (""); ((fhandler_socket *) sb1)->set_addr_family (family); ((fhandler_socket *) sb1)->set_socket_type (type); - ((fhandler_socket *) sb1)->set_connect_state (CONNECTED); + ((fhandler_socket *) sb1)->set_connect_state (connected); sb[0] = sb0; sb[1] = sb1; -- cgit v1.2.3