]> granicus.if.org Git - sudo/commitdiff
Move inclusion of emul/fnmatch.h to be after sudo.h for __P
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 Aug 1999 10:00:22 +0000 (10:00 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 Aug 1999 10:00:22 +0000 (10:00 +0000)
fnmatch.c
parse.c
testsudoers.c

index abe6b07ecda775b8d79ee769c5f55d5b113aeda8..7e0f69b814c291b5a5978c6f3024617cdc63340f 100644 (file)
--- a/fnmatch.c
+++ b/fnmatch.c
@@ -158,7 +158,7 @@ rangematch(pattern, test, flags)
         * consistency with the regular expression syntax.
         * J.T. Conklin (conklin@ngai.kaleida.com)
         */
-       if (negate = (*pattern == '!' || *pattern == '^'))
+       if ((negate = (*pattern == '!' || *pattern == '^')))
                ++pattern;
        
        for (ok = 0; (c = *pattern++) != ']';) {
diff --git a/parse.c b/parse.c
index aba78ff0916c7153301e5faf5fbac46900d39618..ab9f461c912c2ebeeaae8eba3ae72ee6346c2a14 100644 (file)
--- a/parse.c
+++ b/parse.c
 
 #include <stdio.h>
 #ifdef STDC_HEADERS
-#  include <stdlib.h>
+# include <stdlib.h>
 #endif /* STDC_HEADERS */
 #ifdef HAVE_UNISTD_H
-#  include <unistd.h>
+# include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 #ifdef HAVE_STRING_H
-#  include <string.h>
+# include <string.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_STRINGS_H
-#  include <strings.h>
+# include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H)
-#  include <fnmatch.h>
-#else
-#  ifndef HAVE_FNMATCH
-#    include "emul/fnmatch.h"
-#  endif /* HAVE_FNMATCH */
+# include <fnmatch.h>
 #endif /* HAVE_FNMATCH_H */
 #ifdef HAVE_NETGROUP_H
-#  include <netgroup.h>
+# include <netgroup.h>
 #endif /* HAVE_NETGROUP_H */
 #include <ctype.h>
 #include <pwd.h>
 #include <netdb.h>
 #include <sys/stat.h>
 #if HAVE_DIRENT_H
-#  include <dirent.h>
-#  define NAMLEN(dirent) strlen((dirent)->d_name)
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
 #else
-#  define dirent direct
-#  define NAMLEN(dirent) (dirent)->d_namlen
-#  if HAVE_SYS_NDIR_H
-#    include <sys/ndir.h>
-#  endif
-#  if HAVE_SYS_DIR_H
-#    include <sys/dir.h>
-#  endif
-#  if HAVE_NDIR_H
-#    include <ndir.h>
-#  endif
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+#  include <ndir.h>
+# endif
 #endif
 
 #include "sudo.h"
 #include "parse.h"
 #include "interfaces.h"
 
+#ifndef HAVE_FNMATCH
+# include "emul/fnmatch.h"
+#endif /* HAVE_FNMATCH */
+
 #ifndef lint
 static const char rcsid[] = "$Sudo$";
 #endif /* lint */
index 071bee2d35596a3ac28dd0dd539094d51d1ee2dc..511a5271e409657d1f968352ca688ce6027f6089 100644 (file)
 
 #include <stdio.h>
 #ifdef STDC_HEADERS
-#  include <stdlib.h>
+# include <stdlib.h>
 #endif /* STDC_HEADERS */
 #ifdef HAVE_UNISTD_H
-#  include <unistd.h>
+# include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 #ifdef HAVE_STRING_H
-#  include <string.h>
+# include <string.h>
 #endif /* HAVE_STRING_H */
 #ifdef HAVE_STRINGS_H
-#  include <strings.h>
+# include <strings.h>
 #endif /* HAVE_STRINGS_H */
 #if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H)
-#  include <fnmatch.h>
-#else
-#  ifndef HAVE_FNMATCH
-#    include "emul/fnmatch.h"
-#  endif /* HAVE_FNMATCH */
+# include <fnmatch.h>
 #endif /* HAVE_FNMATCH_H */
 #ifdef HAVE_NETGROUP_H
-#  include <netgroup.h>
+# include <netgroup.h>
 #endif /* HAVE_NETGROUP_H */
 #include <ctype.h>
 #include <pwd.h>
 #include "parse.h"
 #include "interfaces.h"
 
+#ifndef HAVE_FNMATCH
+# include "emul/fnmatch.h"
+#endif /* HAVE_FNMATCH */
+
 #ifndef lint
 static const char rcsid[] = "$Sudo$";
 #endif /* lint */