]> granicus.if.org Git - sudo/commitdiff
Add #ifdef __STDC__ around the rangematch function header to avoid
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Mar 2000 19:14:03 +0000 (19:14 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Mar 2000 19:14:03 +0000 (19:14 +0000)
promotion of test to int, thus violating the prototype.  Gcc handles
this gracefully but more std ANSI compilers will complain.

fnmatch.c

index 1238f1bad25e6df6fe8894157f55662a1d42981f..ffbdda94909e3400daff36ebc36170aa9a4a8ee9 100644 (file)
--- a/fnmatch.c
+++ b/fnmatch.c
@@ -169,11 +169,15 @@ fnmatch(pattern, string, flags)
 }
 
 static int
+#ifdef __STDC__
+rangematch(const char *pattern, char test, int flags, char **newp)
+#else
 rangematch(pattern, test, flags, newp)
        const char *pattern;
        char test;
        int flags;
        char **newp;
+#endif
 {
        int negate, ok;
        char c, c2;