aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/tar
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-08-15 22:49:46 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-08-15 22:49:46 +0000
commit280117ea072103388e209cc9ce423ef258e99a7f (patch)
treed538c0c9a1c2967476d87b112b0324d7dea09200 /gnu/usr.bin/tar
parentec5326ee9bbe22c25dde596742184c239d7d7601 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/tar')
-rw-r--r--gnu/usr.bin/tar/fnmatch.c14
-rw-r--r--gnu/usr.bin/tar/port.c2
2 files changed, 12 insertions, 4 deletions
diff --git a/gnu/usr.bin/tar/fnmatch.c b/gnu/usr.bin/tar/fnmatch.c
index ed8c9eea7e35..0acac5fcc233 100644
--- a/gnu/usr.bin/tar/fnmatch.c
+++ b/gnu/usr.bin/tar/fnmatch.c
@@ -16,7 +16,10 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <errno.h>
-#include <fnmatch.h>
+#include "fnmatch.h"
+#ifdef __FreeBSD__
+#include <locale.h>
+#endif
#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS)
extern int errno;
@@ -125,10 +128,15 @@ fnmatch (pattern, string, flags)
return FNM_NOMATCH;
c = *p++;
}
-
+#ifdef __FreeBSD__
+ if ( collate_range_cmp (*n, cstart) >= 0
+ && collate_range_cmp (*n, cend) <= 0
+ )
+ goto matched;
+#else
if (*n >= cstart && *n <= cend)
goto matched;
-
+#endif
if (c == ']')
break;
}
diff --git a/gnu/usr.bin/tar/port.c b/gnu/usr.bin/tar/port.c
index 9a40dc306c8b..c1632459e72e 100644
--- a/gnu/usr.bin/tar/port.c
+++ b/gnu/usr.bin/tar/port.c
@@ -837,7 +837,7 @@ quote_copy_string (string)
from_here = string;
while (*from_here)
{
- c = *from_here++;
+ c = *from_here++ & 0xFF;
if (c == '\\')
{
if (!copying)