diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 23b9d8261..6a55e9bbc 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -677,8 +677,7 @@ unlink_nt (path_conv &pc) /* If possible, hide the non-atomicity of the "remove R/O flag, remove link to file" operation behind a transaction. */ - if (wincap.has_transactions () - && (pc.fs_flags () & FILE_SUPPORTS_TRANSACTIONS)) + if ((pc.fs_flags () & FILE_SUPPORTS_TRANSACTIONS)) start_transaction (old_trans, trans); retry_open: status = NtOpenFile (&fh_ro, FILE_WRITE_ATTRIBUTES, &attr, &io, @@ -2346,8 +2345,7 @@ rename (const char *oldpath, const char *newpath) /* Opening the file must be part of the transaction. It's not sufficient to call only NtSetInformationFile under the transaction. Therefore we have to start the transaction here, if necessary. */ - if (wincap.has_transactions () - && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS) + if ((dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS) && (dstpc->isdir () || (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY)))) start_transaction (old_trans, trans); @@ -2516,9 +2514,7 @@ rename (const char *oldpath, const char *newpath) if (status == STATUS_ACCESS_DENIED && dstpc->exists () && !dstpc->isdir ()) { - if (wincap.has_transactions () - && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS) - && !trans) + if ((dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS) && !trans) { start_transaction (old_trans, trans); /* As mentioned earlier, opening the file must be part of the diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index caa478ba3..832d4e5af 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -23,7 +23,6 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = { is_server:false, needs_count_in_si_lpres2:false, has_gaa_largeaddress_bug:false, - has_transactions:false, has_broken_alloc_console:false, has_restricted_raw_disk_access:false, use_dont_resolve_hack:true, @@ -48,7 +47,6 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = { is_server:false, needs_count_in_si_lpres2:false, has_gaa_largeaddress_bug:false, - has_transactions:false, has_broken_alloc_console:false, has_restricted_raw_disk_access:false, use_dont_resolve_hack:true, @@ -73,7 +71,6 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { is_server:false, needs_count_in_si_lpres2:true, has_gaa_largeaddress_bug:true, - has_transactions:true, has_broken_alloc_console:false, has_restricted_raw_disk_access:true, use_dont_resolve_hack:false, @@ -98,7 +95,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { is_server:false, needs_count_in_si_lpres2:false, has_gaa_largeaddress_bug:true, - has_transactions:true, has_broken_alloc_console:true, has_restricted_raw_disk_access:true, use_dont_resolve_hack:false, @@ -123,7 +119,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { is_server:false, needs_count_in_si_lpres2:false, has_gaa_largeaddress_bug:false, - has_transactions:true, has_broken_alloc_console:true, has_restricted_raw_disk_access:true, use_dont_resolve_hack:false, @@ -148,7 +143,6 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = { is_server:false, needs_count_in_si_lpres2:false, has_gaa_largeaddress_bug:false, - has_transactions:true, has_broken_alloc_console:true, has_restricted_raw_disk_access:true, use_dont_resolve_hack:false, @@ -173,7 +167,6 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) = is_server:false, needs_count_in_si_lpres2:false, has_gaa_largeaddress_bug:false, - has_transactions:true, has_broken_alloc_console:true, has_restricted_raw_disk_access:true, use_dont_resolve_hack:false, diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index bc4abb7c3..9c05ac6a3 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -16,7 +16,6 @@ struct wincaps unsigned is_server : 1; unsigned needs_count_in_si_lpres2 : 1; unsigned has_gaa_largeaddress_bug : 1; - unsigned has_transactions : 1; unsigned has_broken_alloc_console : 1; unsigned has_restricted_raw_disk_access : 1; unsigned use_dont_resolve_hack : 1; @@ -66,7 +65,6 @@ public: bool IMPLEMENT (is_server) bool IMPLEMENT (needs_count_in_si_lpres2) bool IMPLEMENT (has_gaa_largeaddress_bug) - bool IMPLEMENT (has_transactions) bool IMPLEMENT (has_broken_alloc_console) bool IMPLEMENT (has_restricted_raw_disk_access) bool IMPLEMENT (use_dont_resolve_hack)