From 92edcf929ae862a97bb0b8d0494c84b4e1b748b9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 25 Dec 2018 01:07:39 +0100 Subject: [PATCH] Cygwin: wincap: add wincap_10_1803, add has_case_sensitive_dirs item - Allow to disable the flag by calling disable_case_sensitive_dirs. Signed-off-by: Corinna Vinschen --- winsup/cygwin/wincap.cc | 33 ++++++++++++++++++++++++++++++++- winsup/cygwin/wincap.h | 6 ++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 4ba9aa51d..d9aea8ac4 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -36,6 +36,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_unbiased_interrupt_time:false, has_precise_interrupt_time:false, has_posix_file_info:false, + has_case_sensitive_dirs:false, }, }; @@ -57,6 +58,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { has_unbiased_interrupt_time:true, has_precise_interrupt_time:false, has_posix_file_info:false, + has_case_sensitive_dirs:false, }, }; @@ -78,6 +80,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { has_unbiased_interrupt_time:true, has_precise_interrupt_time:false, has_posix_file_info:false, + has_case_sensitive_dirs:false, }, }; @@ -99,6 +102,7 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, has_posix_file_info:false, + has_case_sensitive_dirs:false, }, }; @@ -120,6 +124,7 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) = has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, has_posix_file_info:false, + has_case_sensitive_dirs:false, }, }; @@ -141,6 +146,7 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, has_posix_file_info:false, + has_case_sensitive_dirs:false, }, }; @@ -162,6 +168,29 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = has_unbiased_interrupt_time:true, has_precise_interrupt_time:true, has_posix_file_info:true, + has_case_sensitive_dirs:false, + }, +}; + +wincaps wincap_10_1803 __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_file_info:true, + has_case_sensitive_dirs:true, }, }; @@ -205,7 +234,9 @@ wincapc::init () break; case 10: default: - if (likely (version.dwBuildNumber >= 16299)) + if (likely (version.dwBuildNumber >= 17134)) + caps = &wincap_10_1803; + else if (version.dwBuildNumber >= 16299) caps = &wincap_10_1709; else if (version.dwBuildNumber >= 15063) caps = &wincap_10_1703; diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 649246299..967ddbdfe 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -30,6 +30,7 @@ struct wincaps unsigned has_unbiased_interrupt_time : 1; unsigned has_precise_interrupt_time : 1; unsigned has_posix_file_info : 1; + unsigned has_case_sensitive_dirs : 1; }; }; @@ -80,7 +81,12 @@ public: bool IMPLEMENT (has_unbiased_interrupt_time) bool IMPLEMENT (has_precise_interrupt_time) bool IMPLEMENT (has_posix_file_info) + bool IMPLEMENT (has_case_sensitive_dirs) + void disable_case_sensitive_dirs () + { + ((wincaps *)caps)->has_case_sensitive_dirs = false; + } #undef IMPLEMENT };