https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=13bfb3c63f35d875c1771daea6de4be0176e3b13
commit 13bfb3c63f35d875c1771daea6de4be0176e3b13
Author: Corinna Vinschen
Date: Tue Jan 28 21:59:22 2020 +0100
Cygwin: remove CYGWIN=dos_file_warning option
This option has been disabled long ago and nobody missed it.
Removing drops a bit of unneeded code
Signed-off-by: Corinna Vinschen
Diff:
---
winsup/cygwin/environ.cc| 1 -
winsup/cygwin/external.cc | 5 +
winsup/cygwin/fhandler_disk_file.cc | 2 +-
winsup/cygwin/globals.cc| 1 -
winsup/cygwin/path.cc | 36
winsup/cygwin/path.h| 1 -
winsup/cygwin/pinfo.cc | 4 ++--
winsup/cygwin/quotactl.cc | 2 +-
winsup/doc/cygwinenv.xml| 11 +--
9 files changed, 14 insertions(+), 49 deletions(-)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 7eb4780..3a03657 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -111,7 +111,6 @@ static struct parse_thing
} values[2];
} known[] NO_COPY =
{
- {"dosfilewarning", {&dos_file_warning}, setbool, NULL, {{false}, {true}}},
{"error_start", {func: error_start_init}, isfunc, NULL, {{0}, {0}}},
{"export", {&export_settings}, setbool, NULL, {{false}, {true}}},
{"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 94431bb..14a1dfb 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -452,10 +452,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
res = CYGTLS_PADSIZE;
break;
case CW_SET_DOS_FILE_WARNING:
- {
- dos_file_warning = va_arg (arg, int);
- res = 0;
- }
+ res = 0;
break;
case CW_SET_PRIV_KEY:
{
diff --git a/winsup/cygwin/fhandler_disk_file.cc
b/winsup/cygwin/fhandler_disk_file.cc
index 19a1c5a..be45ad7 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -2062,7 +2062,7 @@ readdir_get_ino (const char *path, bool dot_dot)
strcpy (c, "..");
path = fname;
}
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX | PC_NOWARN | PC_KEEP_HANDLE);
+ path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX | PC_KEEP_HANDLE);
if (pc.isspecial ())
{
if (!stat_worker (pc, &st))
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index a9648fe..942bd1c 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -65,7 +65,6 @@ int NO_COPY dynamically_loaded;
/* Some CYGWIN environment variable variables. */
bool allow_glob = 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 142a739..4da8884 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -532,31 +532,6 @@ path_conv::get_wide_win32_path (PWCHAR wc)
return wc;
}
-static void
-warn_msdos (const char *src)
-{
- if (user_shared->warned_msdos || !cygwin_finished_initializing)
-return;
- tmp_pathbuf tp;
- char *posix_path = tp.c_get ();
- small_printf ("Cygwin WARNING:\n");
- if (cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, src,
- posix_path, NT_MAX_PATH))
-small_printf (
-" MS-DOS style path detected: %ls\n POSIX equivalent preferred.\n",
- src);
- else
-small_printf (
-" MS-DOS style path detected: %ls\n"
-" Preferred POSIX equivalent is: %ls\n",
- src, posix_path);
- small_printf (
-" CYGWIN environment variable option \"nodosfilewarning\" turns off this\n"
-" warning. Consult the user's guide for more details about POSIX paths:\n"
-" http://cygwin.com/cygwin-ug-net/using.html#using-pathnames\n";);
- user_shared->warned_msdos = true;
-}
-
static DWORD
getfileattr (const char *path, bool caseinsensitive) /* path has to be always
absolute. */
{
@@ -1253,8 +1228,6 @@ path_conv::check (const char *src, unsigned opt,
if (tail < path_end && tail > path_copy + 1)
*tail = '/';
set_posix (path_copy);
- if (is_msdos && dos_file_warning && !(opt & PC_NOWARN))
- warn_msdos (src);
}
#if 0
@@ -1916,8 +1889,7 @@ symlink_worker (const char *oldpath, path_conv
&win32_newpath, bool isdevice)
{
char *newplnk = tp.c_get ();
stpcpy (stpcpy (newplnk, win32_newpath.get_posix ()), ".lnk");
- win32_newpath.check (newplnk, PC_SYM_NOFOLLOW | PC_POSIX
- | (isdevice ? PC_NOWARN : 0));
+ win32_newpath.check (newplnk, PC_SYM_NOFOLLOW | PC_POSIX);
}
if (win32_newpath.error)
@@ -3492,7 +3464,7 @@ cygwin_conv_path (cygwin_conv_path_t what, const void
*from, void *to,
{
p.check ((const char *) from,