summaryrefslogtreecommitdiff
path: root/posix/fnmatch.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-25 23:21:20 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-25 23:21:20 +0000
commit722c33bbb6d2984cf537f0d3669617fba041fb50 (patch)
tree2a7f596c5e9979123c3833a1684a2d3516c067f9 /posix/fnmatch.c
parent788e8e7c221825916e6ab11f0079d4c5ede8a057 (diff)
Update.
* string/bits/string2.h: Fix aliasing problems. * sysdeps/i386/i486/bits/string.h: Likewise. * sysdeps/i386/bits/string.h: Likewise. 1998-12-28 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/powerpc/dl-machine.c: Handle shared library profiling. * elf/rtld.c (dl_main): Don't call malloc() between re-relocating the dynamic linker and running the application's crt0. 1999-07-21 Paul D. Smith <psmith@gnu.org> * sysdeps/generic/glob.c: Move getlogin{,_r} prototypes below glob.h to get __P() macro. * posix/fnmatch.c (internal_fnmatch): Use K&R definition syntax, not ANSI. (__strchrnul): This won't exist outside GLIBC, so create one. 1999-07-25 Jakub Jelinek <jj@ultra.linux.cz> * sysdeps/unix/sysv/linux/sparc/bits/types.h: Always define __qaddr_t. __ino64_t should be 32bit unsigned type on sparc32. Define __off64_t to __quad_t instead of __int64_t. Make __pic_pid_t unsigned on sparc32. 1999-07-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * localedata/tst-rpmatch.sh: Use "&" instead of "§" to avoid a bug in bash 2.03. 1999-07-25 Ulrich Drepper <drepper@cygnus.com>
Diffstat (limited to 'posix/fnmatch.c')
-rw-r--r--posix/fnmatch.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index 9617d336f4..b1e1b94afa 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -127,14 +127,35 @@ extern char *getenv ();
extern int errno;
# endif
+/* This function doesn't exist on most systems. */
+
+# if !defined HAVE___STRCHRNUL && !defined _LIBC
+static char *
+__strchrnul (s, c)
+ const char *s;
+ int c;
+{
+ char *result = strchr (s, c);
+ if (result == NULL)
+ result = strchr (s, '\0');
+ return result;
+}
+# 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 (const char *pattern, const char *string,
- int no_leading_period, int flags)
+internal_fnmatch (pattern, string, no_leading_period, flags)
+ const char *pattern;
+ const char *string;
+ int no_leading_period;
+ int flags;
{
register const char *p = pattern, *n = string;
register unsigned char c;