summaryrefslogtreecommitdiff
path: root/contrib/tcsh
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2016-07-13 16:49:48 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2016-07-13 16:49:48 +0000
commitab1e39bc6bc0adf6df49fe795847b97985e9e1d5 (patch)
tree2260c7e418f4ccf7a37892f3ecc4419922d05e0d /contrib/tcsh
parentb22a869924520a9891f0811980cea2cd5695d0ae (diff)
downloadsrc-test-ab1e39bc6bc0adf6df49fe795847b97985e9e1d5.tar.gz
src-test-ab1e39bc6bc0adf6df49fe795847b97985e9e1d5.zip
After removing collation for [a-z] ranges in r302512, mimic system
glob() here too. I try to keep the change minimal to not touch contribed code much. I'll send it upstream when it will be merged to the main branches, but we need this change now here.
Notes
Notes: svn path=/head/; revision=302777
Diffstat (limited to 'contrib/tcsh')
-rw-r--r--contrib/tcsh/glob.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/tcsh/glob.c b/contrib/tcsh/glob.c
index 3680403288159..46dbd7cd6d4fb 100644
--- a/contrib/tcsh/glob.c
+++ b/contrib/tcsh/glob.c
@@ -142,17 +142,23 @@ globcharcoll(__Char c1, __Char c2, int cs)
c1 = towlower(c1);
c2 = towlower(c2);
} else {
+#ifndef __FreeBSD__
/* This should not be here, but I'll rather leave it in than engage in
a LC_COLLATE flamewar about a shell I don't use... */
if (iswlower(c1) && iswupper(c2))
return (1);
if (iswupper(c1) && iswlower(c2))
return (-1);
+#endif
}
s1[0] = c1;
s2[0] = c2;
s1[1] = s2[1] = '\0';
+#ifdef __FreeBSD__
+ return wcscmp(s1, s2);
+#else
return wcscoll(s1, s2);
+#endif
# else /* not WIDE_STRINGS */
char s1[2], s2[2];