From e6a4318d784f5cc977b599117c4691e0d8c5583d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Oct 2014 10:44:49 +0000 Subject: [PATCH] * globals.cc (dos_file_warning): Set to false by default. * path.cc (warn_msdos): Make static. Drop test for dos_file_warning. (path_conv::check): Check for dos_file_warning here to avoid a function call in the default case. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/globals.cc | 2 +- winsup/cygwin/path.cc | 6 +++--- winsup/cygwin/release/1.7.33 | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 669f71237..e8c833377 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2014-10-28 Corinna Vinschen + + * globals.cc (dos_file_warning): Set to false by default. + * path.cc (warn_msdos): Make static. Drop test for dos_file_warning. + (path_conv::check): Check for dos_file_warning here to avoid a function + call in the default case. + 2014-10-27 Corinna Vinschen * dcrt0.cc (cygwin_atexit): Add workaround for broken atexit calls diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index ff80a4b6d..f4eb4a044 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -69,7 +69,7 @@ int NO_COPY dynamically_loaded; /* Some CYGWIN environment variable variables. */ bool allow_glob = true; bool detect_bloda; -bool dos_file_warning = true; +bool dos_file_warning; bool ignore_case_with_glob; bool pipe_byte; bool reset_com; diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 2ead43f9a..6a3a889a3 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -517,10 +517,10 @@ path_conv::get_wide_win32_path (PWCHAR wc) return wc; } -void +static void warn_msdos (const char *src) { - if (user_shared->warned_msdos || !dos_file_warning || !cygwin_finished_initializing) + if (user_shared->warned_msdos || !cygwin_finished_initializing) return; tmp_pathbuf tp; char *posix_path = tp.c_get (); @@ -1202,7 +1202,7 @@ path_conv::check (const char *src, unsigned opt, if (tail < path_end && tail > path_copy + 1) *tail = '/'; set_normalized_path (path_copy); - if (is_msdos && !(opt & PC_NOWARN)) + if (is_msdos && dos_file_warning && !(opt & PC_NOWARN)) warn_msdos (src); } diff --git a/winsup/cygwin/release/1.7.33 b/winsup/cygwin/release/1.7.33 index 13d278648..652a61ed4 100644 --- a/winsup/cygwin/release/1.7.33 +++ b/winsup/cygwin/release/1.7.33 @@ -46,6 +46,8 @@ What changed: add PATH variable with Cygwin installation directory as content to Windows environment to allow loading of Cygwin system DLLs. +- Disable CYGWIN "dosfilewarning" option by default. + - Improve various header files for C++- and standards-compliance. - Doug Lea malloc implementation update from 2.8.3 to the latest 2.8.6.