From: Kern Sibbald Date: Sat, 18 Dec 2004 11:18:16 +0000 (+0000) Subject: Remove FNMATCH test in configure.in and always use X-Git-Tag: Release-1.38.0~700 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e860e416521c6df26049007324395b0d7a89b4a;p=bacula%2Fbacula Remove FNMATCH test in configure.in and always use the one in our library to get the FN_CASEFOLD GNU extensions on all platforms. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1764 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index c34113a08f..adac090114 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -264,9 +264,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if your system has a working POSIX `fnmatch' function. */ -#undef HAVE_FNMATCH - /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index a087caa07b..2f9b54961d 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1594,7 +1594,7 @@ AC_FUNC_ALLOCA AC_FUNC_GETMNTENT AC_FUNC_CLOSEDIR_VOID AC_FUNC_SETPGRP dnl check for BSD setpgrp. -AC_FUNC_FNMATCH +# AC_FUNC_FNMATCH dnl use local version dnl# FreeBSD needs to link libxpg4 diff --git a/bacula/configure b/bacula/configure index 302f99c5fd..6ff43c68bf 100755 --- a/bacula/configure +++ b/bacula/configure @@ -18240,79 +18240,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5 -echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6 -if test "${ac_cv_func_fnmatch_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Some versions of Solaris, SCO, and the GNU C Library - # have a broken or incompatible fnmatch. - # So we run a test program. If we are cross-compiling, take no chance. - # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test. - if test "$cross_compiling" = yes; then - ac_cv_func_fnmatch_works=cross -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -# define y(a, b, c) (fnmatch (a, b, c) == 0) -# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) - -int -main () -{ -exit - (!(y ("a*", "abc", 0) - && n ("d*/*1", "d/s/1", FNM_PATHNAME) - && y ("a\\\\bc", "abc", 0) - && n ("a\\\\bc", "abc", FNM_NOESCAPE) - && y ("*x", ".x", 0) - && n ("*x", ".x", FNM_PERIOD) - && 1)); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fnmatch_works=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_fnmatch_works=no -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5 -echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6 -if test $ac_cv_func_fnmatch_works = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FNMATCH 1 -_ACEOF - -fi - - - + # AC_FUNC_FNMATCH dnl use local version echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5 diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index a29c923807..a5fc2a1333 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -172,7 +172,7 @@ * that it can filter packets, but otherwise, it is not used * or saved */ #define FT_DIRBEGIN 18 /* Directory at beginning (not saved) */ -#define FT_INVALIDFS 19 /* File system not allowed for */ +#define FT_INVALIDFS 19 /* File system not allowed for */ /* Definitions for upper part of type word (see above). */ #define AR_DATA_STREAM (1<<16) /* Data stream id present */ @@ -483,9 +483,6 @@ extern int thr_setconcurrency(int); #ifdef HAVE_DARWIN_OS /* Apparently someone forgot to wrap getdomainname as a C function */ extern "C" int getdomainname(char *name, int len); - -/* Darwin lib fnmatch() doesn't work, so use our own */ -#undef HAVE_FNMATCH #endif #ifdef HAVE_CYGWIN diff --git a/bacula/src/findlib/find.h b/bacula/src/findlib/find.h index 0b62f0da37..11038e5df0 100755 --- a/bacula/src/findlib/find.h +++ b/bacula/src/findlib/find.h @@ -46,11 +46,7 @@ struct utimbuf { #define MODE_RALL (S_IRUSR|S_IRGRP|S_IROTH) -#ifdef HAVE_FNMATCH -#include -#else #include "lib/fnmatch.h" -#endif #ifdef HAVE_REGEX_H #include diff --git a/bacula/src/lib/fnmatch.c b/bacula/src/lib/fnmatch.c index 71dd0e1dd5..6b0ceb6b99 100644 --- a/bacula/src/lib/fnmatch.c +++ b/bacula/src/lib/fnmatch.c @@ -16,7 +16,6 @@ #include "bacula.h" -#ifndef HAVE_FNMATCH /* Enable GNU extensions in fnmatch.h. */ #ifndef _GNU_SOURCE @@ -235,5 +234,3 @@ fnmatch (const char *pattern, const char *string, int flags) } #endif /* _LIBC or not __GNU_LIBRARY__. */ - -#endif /* !HAVE_FNMATCH */