Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-02-22 14:17:01 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-02-22 14:17:01 +0300
commitbd8f891e8ac6ec88bc72cd8c446b6ccba5750821 (patch)
tree723b2939e16ac792c2e59725551868561a79680d /winsup/cygwin/fhandler.cc
parent570858c30fa6add591bf74907de4a7fb93312f20 (diff)
Throughout replace all usage of wincap.shared with the constant
FILE_SHARE_VALID_FLAGS. * fhandler.cc (fhandler_base::open_9x): Drop local variable shared. * wincap.cc: Remove shared member throughout. * wincap.h: Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index c5f727781..ce1e9f7eb 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -465,7 +465,6 @@ fhandler_base::open_9x (int flags, mode_t mode)
int res = 0;
HANDLE x;
int file_attributes;
- int shared;
int creation_distribution;
SECURITY_ATTRIBUTES sa = sec_none;
@@ -509,9 +508,6 @@ fhandler_base::open_9x (int flags, mode_t mode)
if (flags & O_APPEND)
append_mode (true);
- /* These flags are host dependent. */
- shared = wincap.shared ();
-
file_attributes = FILE_ATTRIBUTE_NORMAL;
if (flags & O_DIROPEN)
file_attributes |= FILE_FLAG_BACKUP_SEMANTICS;
@@ -540,7 +536,7 @@ fhandler_base::open_9x (int flags, mode_t mode)
pc.file_attributes (file_attributes & FILE_ATTRIBUTE_VALID_SET_FLAGS);
}
- x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution,
+ x = CreateFile (get_win32_name (), access, FILE_SHARE_VALID_FLAGS, &sa, creation_distribution,
file_attributes, 0);
if (x == INVALID_HANDLE_VALUE)
@@ -567,7 +563,7 @@ fhandler_base::open_9x (int flags, mode_t mode)
set_open_status ();
done:
debug_printf ("%p = CreateFile (%s, %p, %p, %p, %p, %p, 0)",
- x, get_win32_name (), access, shared, &sa,
+ x, get_win32_name (), access, FILE_SHARE_VALID_FLAGS, &sa,
creation_distribution, file_attributes);
syscall_printf ("%d = fhandler_base::open (%s, %p)", res, get_win32_name (),
@@ -589,7 +585,7 @@ fhandler_base::open (int flags, mode_t mode)
int res = 0;
HANDLE x;
ULONG file_attributes = 0;
- ULONG shared = (get_major () == DEV_TAPE_MAJOR ? 0 : wincap.shared ());
+ ULONG shared = (get_major () == DEV_TAPE_MAJOR ? 0 : FILE_SHARE_VALID_FLAGS);
ULONG create_disposition;
ULONG create_options;
SECURITY_ATTRIBUTES sa = sec_none;