summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-07 04:52:01 +0000
committerJim Meyering <jim@meyering.net>1993-04-07 04:52:01 +0000
commit00c3a8127a329b1e56c702e147d9a1d6c3351f0e (patch)
tree4177da64759886333d98f3c55f8bb079f8eefc35
parent07fc05974df6ec335447f994e9b1df774ab364c3 (diff)
downloadgnulib-00c3a8127a329b1e56c702e147d9a1d6c3351f0e.tar.gz
GNU file utilitiesFILEUTILS-3_4_6
-rw-r--r--lib/Makefile.in5
-rw-r--r--lib/backupfile.c10
-rw-r--r--lib/fnmatch.c3
-rw-r--r--lib/makepath.c4
-rw-r--r--lib/userspec.c2
5 files changed, 17 insertions, 7 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index d441c4e3c2..fb21e13dc4 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -64,7 +64,10 @@ realclean: distclean
rm -f TAGS
dist:
- ln $(DISTFILES) ../`cat ../.fname`/lib
+ for file in $(DISTFILES); do \
+ ln $$file ../`cat ../.fname`/lib \
+ || cp $$file ../`cat ../.fname`/lib; \
+ done
libfu.a: $(OBJECTS)
rm -f $@
diff --git a/lib/backupfile.c b/lib/backupfile.c
index 94bb55a269..7a624cfece 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -60,12 +60,14 @@
char *malloc ();
#endif
-#ifndef isascii
-#define ISDIGIT(c) (isdigit ((unsigned char) (c)))
-#else
-#define ISDIGIT(c) (isascii (c) && isdigit (c))
+#if !defined (isascii) || defined (STDC_HEADERS)
+#undef isascii
+#define isascii(c) 1
#endif
+#define ISDIGIT(c) (isascii ((unsigned char ) c) \
+ && isdigit ((unsigned char) (c)))
+
#if defined (HAVE_UNISTD_H)
#include <unistd.h>
#endif
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index be662d9d25..20e2b50502 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -77,7 +77,8 @@ fnmatch (pattern, string, flags)
return 0;
{
- char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? FOLD (*p) : c;
+ char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
+ c1 = FOLD (c1);
for (--p; *n != '\0'; ++n)
if ((c == '[' || FOLD (*n) == c1) &&
fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
diff --git a/lib/makepath.c b/lib/makepath.c
index 12da458cf2..4c19630e66 100644
--- a/lib/makepath.c
+++ b/lib/makepath.c
@@ -51,7 +51,9 @@ extern int errno;
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
+#ifndef index
#define index strchr
+#endif
#else
#include <strings.h>
#endif
@@ -93,7 +95,7 @@ make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string)
int retval = 0;
int oldmask = umask (0);
- dirpath = alloca (strlen (argpath) + 1);
+ dirpath = (char *) alloca (strlen (argpath) + 1);
strcpy (dirpath, argpath);
if (stat (dirpath, &stats))
diff --git a/lib/userspec.c b/lib/userspec.c
index a417cca4ce..44d7d91744 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -24,7 +24,9 @@
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
+#ifndef index
#define index strchr
+#endif
#else
#include <strings.h>
#endif