glob() and glob.h are not available on all platforms.
fcntl.h \
fnmatch.h \
getopt.h \
+ glob.h \
gnumalloc.h \
grp.h \
ip_compat.h \
getrusage \
getspnam \
gettimeofday \
+ glob \
htobe16 \
htole16 \
kqueue\
dnl Configuration input file for Squid
dnl
-dnl $Id: configure.in,v 1.496 2008/01/22 15:34:27 hno Exp $
+dnl $Id: configure.in,v 1.497 2008/02/17 09:24:49 serassio Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AC_CONFIG_SRCDIR([src/main.cc])
AM_INIT_AUTOMAKE([tar-ustar])
-AC_REVISION($Revision: 1.496 $)dnl
+AC_REVISION($Revision: 1.497 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
fcntl.h \
fnmatch.h \
getopt.h \
+ glob.h \
gnumalloc.h \
grp.h \
ip_compat.h \
getrusage \
getspnam \
gettimeofday \
+ glob \
htobe16 \
htole16 \
kqueue\
/* Define to 1 if you have the <glib.h> header file. */
#undef HAVE_GLIB_H
+/* Define to 1 if you have the `glob' function. */
+#undef HAVE_GLOB
+
+/* Define to 1 if you have the <glob.h> header file. */
+#undef HAVE_GLOB_H
+
/* Define to 1 if you have the <gnumalloc.h> header file. */
#undef HAVE_GNUMALLOC_H
/*
- * $Id: cache_cf.cc,v 1.541 2008/02/11 22:26:59 rousskov Exp $
+ * $Id: cache_cf.cc,v 1.542 2008/02/17 09:24:50 serassio Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
#include "Parsing.h"
#include "MemBuf.h"
#include "wordlist.h"
+#if HAVE_GLOB_H
#include <glob.h>
+#endif
#if SQUID_SNMP
#include "snmp.h"
{
int error_count = 0;
char* saveptr = NULL;
+#if HAVE_GLOB
char *path;
glob_t globbuf;
int i;
error_count += parseOneConfigFile(globbuf.gl_pathv[i], depth);
}
globfree(&globbuf);
+#else
+ char* file = strwordtok(files, &saveptr);
+ while (file != NULL) {
+ error_count += parseOneConfigFile(file, depth);
+ file = strwordtok(NULL, &saveptr);
+ }
+#endif /* HAVE_GLOB */
return error_count;
}