Move inclusion of emul/fnmatch.h to be after sudo.h for __P

This commit is contained in:
Todd C. Miller
1999-08-28 10:00:22 +00:00
parent 607e54b5e6
commit a067249e1c
3 changed files with 34 additions and 34 deletions

View File

@@ -158,7 +158,7 @@ rangematch(pattern, test, flags)
* consistency with the regular expression syntax. * consistency with the regular expression syntax.
* J.T. Conklin (conklin@ngai.kaleida.com) * J.T. Conklin (conklin@ngai.kaleida.com)
*/ */
if (negate = (*pattern == '!' || *pattern == '^')) if ((negate = (*pattern == '!' || *pattern == '^')))
++pattern; ++pattern;
for (ok = 0; (c = *pattern++) != ']';) { for (ok = 0; (c = *pattern++) != ']';) {

46
parse.c
View File

@@ -39,26 +39,22 @@
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>
#endif /* STDC_HEADERS */ #endif /* STDC_HEADERS */
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif /* HAVE_UNISTD_H */ #endif /* HAVE_UNISTD_H */
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
# include <string.h> # include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H #ifdef HAVE_STRINGS_H
# include <strings.h> # include <strings.h>
#endif /* HAVE_STRINGS_H */ #endif /* HAVE_STRINGS_H */
#if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H) #if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H)
# include <fnmatch.h> # include <fnmatch.h>
#else
# ifndef HAVE_FNMATCH
# include "emul/fnmatch.h"
# endif /* HAVE_FNMATCH */
#endif /* HAVE_FNMATCH_H */ #endif /* HAVE_FNMATCH_H */
#ifdef HAVE_NETGROUP_H #ifdef HAVE_NETGROUP_H
# include <netgroup.h> # include <netgroup.h>
#endif /* HAVE_NETGROUP_H */ #endif /* HAVE_NETGROUP_H */
#include <ctype.h> #include <ctype.h>
#include <pwd.h> #include <pwd.h>
@@ -70,26 +66,30 @@
#include <netdb.h> #include <netdb.h>
#include <sys/stat.h> #include <sys/stat.h>
#if HAVE_DIRENT_H #if HAVE_DIRENT_H
# include <dirent.h> # include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name) # define NAMLEN(dirent) strlen((dirent)->d_name)
#else #else
# define dirent direct # define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen # define NAMLEN(dirent) (dirent)->d_namlen
# if HAVE_SYS_NDIR_H # if HAVE_SYS_NDIR_H
# include <sys/ndir.h> # include <sys/ndir.h>
# endif # endif
# if HAVE_SYS_DIR_H # if HAVE_SYS_DIR_H
# include <sys/dir.h> # include <sys/dir.h>
# endif # endif
# if HAVE_NDIR_H # if HAVE_NDIR_H
# include <ndir.h> # include <ndir.h>
# endif # endif
#endif #endif
#include "sudo.h" #include "sudo.h"
#include "parse.h" #include "parse.h"
#include "interfaces.h" #include "interfaces.h"
#ifndef HAVE_FNMATCH
# include "emul/fnmatch.h"
#endif /* HAVE_FNMATCH */
#ifndef lint #ifndef lint
static const char rcsid[] = "$Sudo$"; static const char rcsid[] = "$Sudo$";
#endif /* lint */ #endif /* lint */

View File

@@ -39,26 +39,22 @@
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>
#endif /* STDC_HEADERS */ #endif /* STDC_HEADERS */
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif /* HAVE_UNISTD_H */ #endif /* HAVE_UNISTD_H */
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
# include <string.h> # include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H #ifdef HAVE_STRINGS_H
# include <strings.h> # include <strings.h>
#endif /* HAVE_STRINGS_H */ #endif /* HAVE_STRINGS_H */
#if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H) #if defined(HAVE_FNMATCH) && defined(HAVE_FNMATCH_H)
# include <fnmatch.h> # include <fnmatch.h>
#else
# ifndef HAVE_FNMATCH
# include "emul/fnmatch.h"
# endif /* HAVE_FNMATCH */
#endif /* HAVE_FNMATCH_H */ #endif /* HAVE_FNMATCH_H */
#ifdef HAVE_NETGROUP_H #ifdef HAVE_NETGROUP_H
# include <netgroup.h> # include <netgroup.h>
#endif /* HAVE_NETGROUP_H */ #endif /* HAVE_NETGROUP_H */
#include <ctype.h> #include <ctype.h>
#include <pwd.h> #include <pwd.h>
@@ -76,6 +72,10 @@
#include "parse.h" #include "parse.h"
#include "interfaces.h" #include "interfaces.h"
#ifndef HAVE_FNMATCH
# include "emul/fnmatch.h"
#endif /* HAVE_FNMATCH */
#ifndef lint #ifndef lint
static const char rcsid[] = "$Sudo$"; static const char rcsid[] = "$Sudo$";
#endif /* lint */ #endif /* lint */