From 70c370d674c5696d39e64970300c889c64ecd752 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 12 Apr 2001 21:21:37 +0000 Subject: * dir.cc (mkdir): Check for case clash. * environ.cc: Add extern declaration for `pcheck_case'. (check_case_init): New function. (struct parse_thing): Add "check_case" option. * errno.cc (_sys_nerrlist): Add text for ECASECLASH. (strerror): Add case branch for ECASECLASH. * fhandler.cc (fhandler_disk_file::open): Check for case clash. * path.cc: Add global variable `pcheck_case'. (struct symlink_info): Add member `case_clash' and method `case_check'. (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'. (pathnmatch): New funtion. (pathmatch): Ditto. (path_conv::check): Add handling for case checking. (symlink): Check for case clash. (symlink_info::check): Add parameter for case checking. Handle case checking. (symlink_info::case_check): New method. (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT. * path.h: Add extern declarations for `pathmatch' and `pathnmatch'. (enum case_checking): New enumeration type describing the case checking behaviour of path conversion routines. (class path_conv): Add member `case_clash'. * syscalls.cc (_link): Check for case clash. --- winsup/cygwin/errno.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/errno.cc') diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc index c7b491cb4..3a4026077 100644 --- a/winsup/cygwin/errno.cc +++ b/winsup/cygwin/errno.cc @@ -283,7 +283,8 @@ extern const char __declspec(dllexport) * const _sys_errlist[]= /* ESTALE 133 */ "Stale NFS file handle", /* ENOTSUP 134 */ "134", /* ENOMEDIUM 135 */ "no medium", -/* ENOSHARE 136 */ "No such host or network path" +/* ENOSHARE 136 */ "No such host or network path", +/* ECASECLASH 137 */ "Filename exists with different case" }; int __declspec(dllexport) _sys_nerr = @@ -659,6 +660,9 @@ strerror (int errnum) case ENOSHARE: error = "No such host or network path"; break; + case ECASECLASH: + error = "Filename exists with different case"; + break; default: #ifdef _MT_SAFE char *buf= _reent_winsup()->_strerror_buf; -- cgit v1.2.3