public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Drop has_transactions flag
@ 2016-06-24 11:19 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2016-06-24 11:19 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9aab8eb5b6fe88deca2274ddd1695d41ca28346c
commit 9aab8eb5b6fe88deca2274ddd1695d41ca28346c
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Tue Dec 15 15:19:05 2015 +0100
Drop has_transactions flag
Diff:
---
winsup/cygwin/syscalls.cc | 10 +++-------
winsup/cygwin/wincap.cc | 7 -------
winsup/cygwin/wincap.h | 2 --
3 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 23b9d82..6a55e9b 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 caa478b..832d4e5 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 bc4abb7..9c05ac6 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-24 11:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 11:19 [newlib-cygwin] Drop has_transactions flag Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).