From a067249e1c6fe8c6eb7379f9b69d3a75cde2e557 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 28 Aug 1999 10:00:22 +0000 Subject: [PATCH] Move inclusion of emul/fnmatch.h to be after sudo.h for __P --- fnmatch.c | 2 +- parse.c | 46 +++++++++++++++++++++++----------------------- testsudoers.c | 20 ++++++++++---------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/fnmatch.c b/fnmatch.c index abe6b07ec..7e0f69b81 100644 --- 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 aba78ff09..ab9f461c9 100644 --- a/parse.c +++ b/parse.c @@ -39,26 +39,22 @@ #include #ifdef STDC_HEADERS -# include +# include #endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H -# include +# include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_STRING_H -# include +# include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H -# include +# include #endif /* HAVE_STRINGS_H */ #if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H) -# include -#else -# ifndef HAVE_FNMATCH -# include "emul/fnmatch.h" -# endif /* HAVE_FNMATCH */ +# include #endif /* HAVE_FNMATCH_H */ #ifdef HAVE_NETGROUP_H -# include +# include #endif /* HAVE_NETGROUP_H */ #include #include @@ -70,26 +66,30 @@ #include #include #if HAVE_DIRENT_H -# include -# define NAMLEN(dirent) strlen((dirent)->d_name) +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) #else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H -# include -# endif -# if HAVE_SYS_DIR_H -# include -# endif -# if HAVE_NDIR_H -# include -# endif +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# 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 */ diff --git a/testsudoers.c b/testsudoers.c index 071bee2d3..511a5271e 100644 --- a/testsudoers.c +++ b/testsudoers.c @@ -39,26 +39,22 @@ #include #ifdef STDC_HEADERS -# include +# include #endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H -# include +# include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_STRING_H -# include +# include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H -# include +# include #endif /* HAVE_STRINGS_H */ #if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H) -# include -#else -# ifndef HAVE_FNMATCH -# include "emul/fnmatch.h" -# endif /* HAVE_FNMATCH */ +# include #endif /* HAVE_FNMATCH_H */ #ifdef HAVE_NETGROUP_H -# include +# include #endif /* HAVE_NETGROUP_H */ #include #include @@ -76,6 +72,10 @@ #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 */ -- 2.40.0