summaryrefslogtreecommitdiff
path: root/glob
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-09-14 00:17:58 +0000
committerPaul Smith <psmith@gnu.org>1999-09-14 00:17:58 +0000
commit4121dea6a59367b4431cbe7a3c43d74fec9fd832 (patch)
tree1b614d858168eb4a313d773de343feecd3087c3c /glob
parentb88c1d3a3db2d8d3381fe423edd7bd794f7cb21a (diff)
downloadgunmake-4121dea6a59367b4431cbe7a3c43d74fec9fd832.tar.gz
* Some configuration fixes.
Diffstat (limited to 'glob')
-rw-r--r--glob/ChangeLog13
-rw-r--r--glob/fnmatch.c48
-rw-r--r--glob/glob.h28
3 files changed, 53 insertions, 36 deletions
diff --git a/glob/ChangeLog b/glob/ChangeLog
index 0cb2fcb..98c506d 100644
--- a/glob/ChangeLog
+++ b/glob/ChangeLog
@@ -1,3 +1,16 @@
+1999-09-12 Paul D. Smith <psmith@gnu.org>
+
+ * fnmatch.c: Last GLIBC version wouldn't compile outside of GLIBC
+ (undefined reference to internal_function). Update to the latest
+ version
+
+1999-09-11 Paul Eggert <eggert@twinsun.com>
+
+ * glob.h (glob): If #defining to glob64, do this before
+ declaring it, so that all declarations and uses match, and
+ do not declare glob64, to avoid a declaration clash.
+ (globfree): Likewise with globfree64.
+
1999-09-08 Eli Zaretskii <eliz@is.elta.co.il>
* glob.c (prefix_array) [__MSDOS__,WINDOWS32]: Keep the trailing
diff --git a/glob/fnmatch.c b/glob/fnmatch.c
index b1e1b94..1f4ead5 100644
--- a/glob/fnmatch.c
+++ b/glob/fnmatch.c
@@ -64,27 +64,27 @@
# define ISASCII(c) isascii(c)
# endif
-#ifdef isblank
-# define ISBLANK(c) (ISASCII (c) && isblank (c))
-#else
-# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-#endif
-#ifdef isgraph
-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
-#else
-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
-#endif
+# ifdef isblank
+# define ISBLANK(c) (ISASCII (c) && isblank (c))
+# else
+# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+# endif
+# ifdef isgraph
+# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
+# else
+# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
+# endif
-#define ISPRINT(c) (ISASCII (c) && isprint (c))
-#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-#define ISALNUM(c) (ISASCII (c) && isalnum (c))
-#define ISALPHA(c) (ISASCII (c) && isalpha (c))
-#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-#define ISLOWER(c) (ISASCII (c) && islower (c))
-#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-#define ISSPACE(c) (ISASCII (c) && isspace (c))
-#define ISUPPER(c) (ISASCII (c) && isupper (c))
-#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
+# define ISPRINT(c) (ISASCII (c) && isprint (c))
+# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
+# define ISALNUM(c) (ISASCII (c) && isalnum (c))
+# define ISALPHA(c) (ISASCII (c) && isalpha (c))
+# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
+# define ISLOWER(c) (ISASCII (c) && islower (c))
+# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
+# define ISSPACE(c) (ISASCII (c) && isspace (c))
+# define ISUPPER(c) (ISASCII (c) && isupper (c))
+# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
@@ -142,15 +142,19 @@ __strchrnul (s, c)
}
# endif
+# ifndef internal_function
+/* Inside GNU libc we mark some function in a special way. In other
+ environments simply ignore the marking. */
+# define internal_function
+# endif
+
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
static int internal_fnmatch __P ((const char *pattern, const char *string,
int no_leading_period, int flags))
internal_function;
static int
-#ifdef _LIBC
internal_function
-#endif
internal_fnmatch (pattern, string, no_leading_period, flags)
const char *pattern;
const char *string;
diff --git a/glob/glob.h b/glob/glob.h
index 6a3ab18..7c2a67a 100644
--- a/glob/glob.h
+++ b/glob/glob.h
@@ -140,6 +140,19 @@ typedef struct
} glob64_t;
#endif
+#if _FILE_OFFSET_BITS == 64 && __GNUC__ < 2
+# define glob glob64
+# define globfree globfree64
+#else
+# ifdef _LARGEFILE64_SOURCE
+extern int glob64 __P ((__const char *__pattern, int __flags,
+ int (*__errfunc) (__const char *, int),
+ glob64_t *__pglob));
+
+extern void globfree64 __P ((glob64_t *__pglob));
+# endif
+#endif
+
/* Do glob searching for PATTERN, placing results in PGLOB.
The bits defined above may be set in FLAGS.
If a directory cannot be opened or read and ERRFUNC is not nil,
@@ -148,7 +161,7 @@ typedef struct
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
Otherwise, `glob' returns zero. */
-#if _FILE_OFFSET_BITS != 64
+#if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2
extern int glob __P ((__const char *__pattern, int __flags,
int (*__errfunc) (__const char *, int),
glob_t *__pglob));
@@ -156,24 +169,11 @@ extern int glob __P ((__const char *__pattern, int __flags,
/* Free storage allocated in PGLOB by a previous `glob' call. */
extern void globfree __P ((glob_t *__pglob));
#else
-# if __GNUC__ >= 2
extern int glob __P ((__const char *__pattern, int __flags,
int (*__errfunc) (__const char *, int),
glob_t *__pglob)) __asm__ ("glob64");
extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
-# else
-# define glob glob64
-# define globfree globfree64
-# endif
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-extern int glob64 __P ((__const char *__pattern, int __flags,
- int (*__errfunc) (__const char *, int),
- glob64_t *__pglob));
-
-extern void globfree64 __P ((glob64_t *__pglob));
#endif