diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 2628d942b..04035a9ab 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -698,7 +698,8 @@ unlink_nt (path_conv &pc) /* First check if we can use POSIX unlink semantics: W10 1709++, local NTFS. With POSIX unlink semantics the entire job gets MUCH easier and faster. Just try to do it and if it fails, it fails. */ - if (wincap.has_posix_file_info () && !pc.isremote () && pc.fs_is_ntfs ()) + if (wincap.has_posix_unlink_semantics () + && !pc.isremote () && pc.fs_is_ntfs ()) { FILE_DISPOSITION_INFORMATION_EX fdie; @@ -2520,7 +2521,7 @@ rename2 (const char *oldpath, const char *newpath, unsigned int at2flags) } /* POSIX semantics only on local NTFS drives. */ - use_posix_semantics = wincap.has_posix_file_info () + use_posix_semantics = wincap.has_posix_rename_semantics () && !oldpc.isremote () && oldpc.fs_is_ntfs (); diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index d9aea8ac4..4c1c7b401 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -35,8 +35,9 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_unprivileged_createsymlink:false, has_unbiased_interrupt_time:false, has_precise_interrupt_time:false, - has_posix_file_info:false, + has_posix_unlink_semantics:false, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -57,8 +58,9 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_unprivileged_createsymlink:false, has_unbiased_interrupt_time:true, has_precise_interrupt_time:false, - has_posix_file_info:false, + has_posix_unlink_semantics:false, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -79,8 +81,9 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_unprivileged_createsymlink:false, has_unbiased_interrupt_time:true, has_precise_interrupt_time:false, - has_posix_file_info:false, + has_posix_unlink_semantics:false, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -101,8 +104,9 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_unprivileged_createsymlink:false, has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, - has_posix_file_info:false, + has_posix_unlink_semantics:false, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -123,8 +127,9 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) = has_unprivileged_createsymlink:false, has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, - has_posix_file_info:false, + has_posix_unlink_semantics:false, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -145,8 +150,9 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_unprivileged_createsymlink:true, has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, - has_posix_file_info:false, + has_posix_unlink_semantics:false, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -167,8 +173,9 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_unprivileged_createsymlink:true, has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, - has_posix_file_info:true, + has_posix_unlink_semantics:true, has_case_sensitive_dirs:false, + has_posix_rename_semantics:false, }, }; @@ -189,8 +196,32 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = has_unprivileged_createsymlink:true, has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, - has_posix_file_info:true, + has_posix_unlink_semantics:true, has_case_sensitive_dirs:true, + has_posix_rename_semantics:false, + }, +}; + +wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = { + def_guard_pages:2, + { + is_server:false, + needs_count_in_si_lpres2:false, + has_gaa_largeaddress_bug:false, + has_broken_alloc_console:true, + has_console_logon_sid:true, + has_precise_system_time:true, + has_microsoft_accounts:true, + has_processor_groups:true, + has_broken_prefetchvm:false, + has_new_pebteb_region:true, + has_broken_whoami:false, + has_unprivileged_createsymlink:true, + has_unbiased_interrupt_time:true, + has_precise_interrupt_time:true, + has_posix_unlink_semantics:true, + has_case_sensitive_dirs:true, + has_posix_rename_semantics:true, }, }; @@ -234,7 +265,9 @@ wincapc::init () break; case 10: default: - if (likely (version.dwBuildNumber >= 17134)) + if (likely (version.dwBuildNumber >= 17763)) + caps = &wincap_10_1809; + else if (version.dwBuildNumber >= 17134) caps = &wincap_10_1803; else if (version.dwBuildNumber >= 16299) caps = &wincap_10_1709; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 967ddbdfe..d89fd71b4 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -29,8 +29,9 @@ struct wincaps unsigned has_unprivileged_createsymlink : 1; unsigned has_unbiased_interrupt_time : 1; unsigned has_precise_interrupt_time : 1; - unsigned has_posix_file_info : 1; + unsigned has_posix_unlink_semantics : 1; unsigned has_case_sensitive_dirs : 1; + unsigned has_posix_rename_semantics : 1; }; }; @@ -80,8 +81,9 @@ public: bool IMPLEMENT (has_unprivileged_createsymlink) bool IMPLEMENT (has_unbiased_interrupt_time) bool IMPLEMENT (has_precise_interrupt_time) - bool IMPLEMENT (has_posix_file_info) + bool IMPLEMENT (has_posix_unlink_semantics) bool IMPLEMENT (has_case_sensitive_dirs) + bool IMPLEMENT (has_posix_rename_semantics) void disable_case_sensitive_dirs () {