diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-12-19 08:54:25 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-12-19 10:20:59 -0800 |
commit | 38104ca6b98180efc6bdb6a56c1fcc3910e29d68 (patch) | |
tree | 0c9408c1d6c7eb196a226e5de28c22acf2ab8324 /compat/fnmatch | |
parent | t7004: do not create unneeded gpghome/gpg.conf when GPG is not used (diff) | |
download | tgif-38104ca6b98180efc6bdb6a56c1fcc3910e29d68.tar.xz |
compat/fnmatch: update old-style definition to ANSI
We try to avoid touching borrowed code, but we encourage people to
write without old-style definition and compile with -Werror these
days, and on platforms that need to use NO_FNMATCH, these three
functions make the compilation fail.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/fnmatch')
-rw-r--r-- | compat/fnmatch/fnmatch.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c index 0ff1d273a5..b8b7dc2543 100644 --- a/compat/fnmatch/fnmatch.c +++ b/compat/fnmatch/fnmatch.c @@ -135,9 +135,9 @@ extern int errno; # if !defined HAVE___STRCHRNUL && !defined _LIBC static char * -__strchrnul (s, c) - const char *s; - int c; +__strchrnul (const char *s, int c) + + { char *result = strchr (s, c); if (result == NULL) @@ -159,11 +159,11 @@ static int internal_fnmatch __P ((const char *pattern, const char *string, internal_function; static int internal_function -internal_fnmatch (pattern, string, no_leading_period, flags) - const char *pattern; - const char *string; - int no_leading_period; - int flags; +internal_fnmatch (const char *pattern, const char *string, int no_leading_period, int flags) + + + + { register const char *p = pattern, *n = string; register unsigned char c; @@ -481,10 +481,10 @@ internal_fnmatch (pattern, string, no_leading_period, flags) int -fnmatch (pattern, string, flags) - const char *pattern; - const char *string; - int flags; +fnmatch (const char *pattern, const char *string, int flags) + + + { return internal_fnmatch (pattern, string, flags & FNM_PERIOD, flags); } |