Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
compat/fnmatch: update old-style definition to ANSI
author
Junio C Hamano
<gitster@pobox.com>
Wed, 19 Dec 2012 16:54:25 +0000
(08:54 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 19 Dec 2012 18:20:59 +0000
(10:20 -0800)
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>
compat/fnmatch/fnmatch.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
086cb91
)
diff --git
a/compat/fnmatch/fnmatch.c
b/compat/fnmatch/fnmatch.c
index 0ff1d273a5839d15a908a4ed90b56d59b151e6e0..b8b7dc254373fb0f7b2a7b16163fa72e1e8c5f7b 100644
(file)
--- 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 *
# 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)
{
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_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;
{
register const char *p = pattern, *n = string;
register unsigned char c;
@@
-481,10
+481,10
@@
internal_fnmatch (pattern, string, no_leading_period, flags)
int
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);
}
{
return internal_fnmatch (pattern, string, flags & FNM_PERIOD, flags);
}