dnl Configuration input file for Squid
dnl
-dnl $Id: configure.in,v 1.425 2006/07/02 16:53:46 serassio Exp $
+dnl $Id: configure.in,v 1.426 2006/07/02 19:27:17 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.425 $)dnl
+AC_REVISION($Revision: 1.426 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
srand48 \
srandom \
statfs \
+ strsep \
sysconf \
syslog \
timegm \
AM_CONDITIONAL(NEED_OWN_SNPRINTF, true)
fi
+AM_CONDITIONAL(NEED_OWN_STRSEP, false)
+if test "$ac_cv_func_strsep" = "no" ; then
+ AM_CONDITIONAL(NEED_OWN_STRSEP, true)
+fi
+
dnl
dnl Test for va_copy
dnl
## Process this file with automake to produce Makefile.in
#
-# $Id: Makefile.am,v 1.21 2006/05/27 00:58:15 hno Exp $
+# $Id: Makefile.am,v 1.22 2006/07/02 19:27:17 serassio Exp $
#
DIST_SUBDIRS = libTrie cppunit-1.10.0
else
SNPRINTFSOURCE=
endif
+if NEED_OWN_STRSEP
+STRSEPSOURCE=strsep.c
+else
+STRSEPSOURCE=
+endif
if NEED_OWN_MD5
MD5SOURCE=md5.c
else
EXTRA_libmiscutil_a_SOURCES = \
md5.c \
Profiler.c \
- snprintf.c
+ snprintf.c \
+ strsep.c
libmiscutil_a_SOURCES = \
MemPool.cc \
base64.c \
safe_inet_addr.c \
$(SNPRINTFSOURCE) \
Splay.cc \
+ $(STRSEPSOURCE) \
stub_memaccount.c \
util.c \
uudecode.c \
--- /dev/null
+/*
+ * $Id: strsep.c,v 1.1 2006/07/02 19:27:17 serassio Exp $
+ */
+
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ * Written by Yoann Vandoorselaere <yoann@prelude-ids.org>
+ *
+ * The file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/* Specification. */
+#include "strsep.h"
+
+#include <string.h>
+
+char *
+strsep (char **stringp, const char *delim)
+{
+ char *start = *stringp;
+ char *ptr;
+
+ if (!start)
+ return NULL;
+
+ if (!*delim)
+ ptr = start + strlen (start);
+ else
+ {
+ ptr = strpbrk (start, delim);
+ if (!ptr)
+ {
+ *stringp = NULL;
+ return start;
+ }
+ }
+
+ *ptr = '\0';
+ *stringp = ptr + 1;
+
+ return start;
+}