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/fhandler.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 2b364dbec..2411653de 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -678,7 +678,7 @@ fhandler_base::write (const void *ptr, size_t len) DWORD size_high = 0; LONG pos_high = 0; - set_did_lseek (0); /* don't do it again */ + set_did_lseek (false); /* don't do it again */ actual_length = GetFileSize (get_output_handle (), &size_high); actual_length += ((_off64_t) size_high) << 32; @@ -970,7 +970,7 @@ fhandler_base::lseek (_off64_t offset, int whence) /* When next we write(), we will check to see if *this* seek went beyond the end of the file, and back-seek and fill with zeros if so - DJ */ - set_did_lseek (); + set_did_lseek (true); /* If this was a SEEK_CUR with offset 0, we still might have readahead that we have to take into account when calculating @@ -1256,9 +1256,9 @@ fhandler_base::operator delete (void *p) } /* Normal I/O constructor */ -fhandler_base::fhandler_base (): - status (0), - query_open (no_query), +fhandler_base::fhandler_base () : + status (), + open_status (), access (0), io_handle (NULL), namehash (0), @@ -1268,7 +1268,6 @@ fhandler_base::fhandler_base (): raixget (0), raixput (0), rabuflen (0), - open_status (0), fs_flags (0), read_state (NULL), archetype (NULL), -- cgit v1.2.3