From: Amos Jeffries Date: Wed, 21 Jan 2009 08:05:22 +0000 (+1300) Subject: Name libsquid-compat and fix remaining build errors X-Git-Tag: SQUID_3_2_0_1~1190^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc937513d8e276dabd87d1d21b40413fdb994c33;p=thirdparty%2Fsquid.git Name libsquid-compat and fix remaining build errors --- diff --git a/Makefile.am b/Makefile.am index e43ec44d38..59a259443d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,8 +2,8 @@ # AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign -DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers test-suite tools -SUBDIRS = src/compat lib @makesnmplib@ scripts src/ip src icons errors doc helpers test-suite tools +DIST_SUBDIRS = libsquid-compat lib snmplib scripts src icons errors contrib doc helpers test-suite tools +SUBDIRS = libsquid-compat lib @makesnmplib@ scripts src/ip src icons errors doc helpers test-suite tools DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` diff --git a/configure.in b/configure.in index efbbdc35ad..86477d6bb8 100644 --- a/configure.in +++ b/configure.in @@ -95,7 +95,7 @@ AC_PROG_RANLIB CRYPTLIB='' REGEXLIB='' # -lregex -LIBREGEX='' # libregex.a +# LIBREGEX='' # libregex.a dnl find out the exe extension for this platform. If it's not empty, use it for CGI's as well. AC_EXEEXT @@ -293,15 +293,6 @@ if test -z "$PRESET_LDFLAGS"; then fi fi -AC_ARG_ENABLE(gnuregex, - AC_HELP_STRING([--enable-gnuregex], - [Compile GNUregex. Unless you have reason to use - this option, you should not enable it. - This library file is usually only required on Windows and - very old Unix boxes which do not have their own regex - library built in.]), -[USE_GNUREGEX=$enableval]) - SquidInline="yes" AC_ARG_ENABLE(optimizations, @@ -3226,6 +3217,14 @@ if test "$LINUX_TPROXY2" ; then fi fi +AC_ARG_ENABLE(gnuregex, + AC_HELP_STRING([--enable-gnuregex], + [Compile GNUregex. Unless you have reason to use + this option, you should not enable it. + This library file is usually only required on Windows and + very old Unix boxes which do not have their own regex + library built in.]), +[USE_GNUREGEX=$enableval]) if test -z "$USE_GNUREGEX" ; then case "$host" in *-sun-solaris2.[[0-4]]) @@ -3249,12 +3248,12 @@ fi fi AC_MSG_RESULT($USE_GNUREGEX) if test "$USE_GNUREGEX" = "yes"; then - REGEXLIB="-lregex" - LIBREGEX="libregex.a" + # override system regex with ours. Not good. But what was asked for. + REGEXLIB="" AC_DEFINE(USE_GNUREGEX,1,[Define if we should use GNU regex]) fi AC_SUBST(REGEXLIB) -AC_SUBST(LIBREGEX) +#AC_SUBST(LIBREGEX) dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Default FD_SETSIZE value) @@ -3810,12 +3809,12 @@ rm -f core AC_CONFIG_FILES([\ Makefile \ + libsquid-compat/Makefile \ lib/Makefile \ scripts/Makefile \ scripts/RunCache \ scripts/RunAccel \ src/Makefile \ - src/compat/Makefile \ src/fs/Makefile \ src/repl/Makefile \ src/auth/Makefile \ diff --git a/helpers/basic_auth/DB/Makefile.am b/helpers/basic_auth/DB/Makefile.am index e334cb7dc1..0ac34f27d7 100644 --- a/helpers/basic_auth/DB/Makefile.am +++ b/helpers/basic_auth/DB/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.3 2007/07/19 02:54:21 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # diff --git a/helpers/basic_auth/LDAP/Makefile.am b/helpers/basic_auth/LDAP/Makefile.am index 6b2bdf7957..a721893ff1 100644 --- a/helpers/basic_auth/LDAP/Makefile.am +++ b/helpers/basic_auth/LDAP/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid LDAP authentication helper # -# $Id: Makefile.am,v 1.6 2005/03/19 15:24:07 serassio Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,5 +11,13 @@ man_MANS = squid_ldap_auth.8 EXTRA_DIST = squid_ldap_auth.8 squid_ldap_auth_SOURCES = squid_ldap_auth.c -LDADD = -L$(top_builddir)/lib -lmiscutil $(LIB_LDAP) $(LIB_LBER) $(XTRA_LIBS) -INCLUDES = -I$(top_srcdir)/include +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(LIB_LDAP) \ + $(LIB_LBER) \ + $(XTRA_LIBS) + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include diff --git a/helpers/basic_auth/MSNT/Makefile.am b/helpers/basic_auth/MSNT/Makefile.am index 09565e16e4..5e68b0bd91 100644 --- a/helpers/basic_auth/MSNT/Makefile.am +++ b/helpers/basic_auth/MSNT/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.10 2003/01/23 00:35:26 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -27,9 +27,12 @@ EXTRA_DIST = \ sysconf_DATA = \ msntauth.conf.default -LDADD = -L$(top_builddir)/lib -lmiscutil $(XTRA_LIBS) +LDADD = -L$(top_builddir)/lib -lmiscutil $(XTRA_LIBS) -L$(top_builddir)/libsquid-compat/libsquid-compat.la -INCLUDES = -I$(top_srcdir)/include +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src confload.o: confload.c $(COMPILE) -DSYSCONFDIR=\"$(sysconfdir)\" -c $(srcdir)/confload.c -o $@ @@ -41,5 +44,3 @@ install-data-local: echo "$(INSTALL_DATA) $(srcdir)/msntauth.conf.default $(DESTDIR)$(sysconfdir)/msntauth.conf" ; \ $(INSTALL_DATA) $(srcdir)/msntauth.conf.default $(DESTDIR)$(sysconfdir)/msntauth.conf ; \ fi - - diff --git a/helpers/basic_auth/NCSA/Makefile.am b/helpers/basic_auth/NCSA/Makefile.am index 43d736f555..f41aaa752a 100644 --- a/helpers/basic_auth/NCSA/Makefile.am +++ b/helpers/basic_auth/NCSA/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.6 2007/06/25 11:27:03 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -10,5 +10,14 @@ libexec_PROGRAMS = ncsa_auth ncsa_auth_SOURCES = ncsa_auth.c crypt_md5.c crypt_md5.h man_MANS = ncsa_auth.8 EXTRA_DIST = ncsa_auth.8 -LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) $(SSLLIB) -INCLUDES = -I$(top_srcdir)/include +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(CRYPTLIB) \ + $(XTRA_LIBS) \ + $(SSLLIB) + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src diff --git a/helpers/basic_auth/PAM/Makefile.am b/helpers/basic_auth/PAM/Makefile.am index 1d992a9fe4..321027c0c1 100644 --- a/helpers/basic_auth/PAM/Makefile.am +++ b/helpers/basic_auth/PAM/Makefile.am @@ -1,14 +1,21 @@ # # Makefile for the Squid PAM authentication helper # -# $Id: Makefile.am,v 1.7 2003/08/03 20:38:02 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # -INCLUDES = -I$(top_srcdir)/include - man_MANS = pam_auth.8 EXTRA_DIST = pam_auth.8 libexec_PROGRAMS = pam_auth -LDADD = -L$(top_builddir)/lib -lmiscutil -lpam $(XTRA_LIBS) + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + -lpam \ + $(XTRA_LIBS) diff --git a/helpers/basic_auth/POP3/Makefile.am b/helpers/basic_auth/POP3/Makefile.am index 1a957a9620..a41a181286 100644 --- a/helpers/basic_auth/POP3/Makefile.am +++ b/helpers/basic_auth/POP3/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.1 2006/12/09 23:28:23 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # diff --git a/helpers/basic_auth/SASL/Makefile.am b/helpers/basic_auth/SASL/Makefile.am index 522c9e8177..5a40307330 100644 --- a/helpers/basic_auth/SASL/Makefile.am +++ b/helpers/basic_auth/SASL/Makefile.am @@ -1,13 +1,21 @@ # # Makefile for the Squid SASL authentication helper # -# $Id: Makefile.am,v 1.7 2004/12/20 16:30:15 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # -INCLUDES = -I$(top_srcdir)/include - libexec_PROGRAMS = sasl_auth -LDADD = -L$(top_builddir)/lib -lmiscutil $(LIBSASL) $(XTRA_LIBS) + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(LIBSASL) \ + $(XTRA_LIBS) + EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf diff --git a/helpers/basic_auth/SMB/Makefile.am b/helpers/basic_auth/SMB/Makefile.am index 4d7f8bb58f..fcb640a1bf 100644 --- a/helpers/basic_auth/SMB/Makefile.am +++ b/helpers/basic_auth/SMB/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.5 2003/01/23 00:35:40 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -22,6 +22,11 @@ libexec_PROGRAMS = smb_auth smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\" EXTRA_DIST = smb_auth.sh COPYING-2.0 -LDADD = -L$(top_builddir)/lib -lmiscutil $(XTRA_LIBS) +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include -INCLUDES = -I$(top_srcdir)/include +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(XTRA_LIBS) diff --git a/helpers/basic_auth/YP/Makefile.am b/helpers/basic_auth/YP/Makefile.am index 36bdf67934..3caad7b372 100644 --- a/helpers/basic_auth/YP/Makefile.am +++ b/helpers/basic_auth/YP/Makefile.am @@ -1,11 +1,19 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.5 2003/01/23 00:35:44 robertc Exp $ +# $Id$ # # libexec_PROGRAMS = yp_auth yp_auth_SOURCES = yp_auth.c nis_support.h nis_support.c -LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) -INCLUDES = -I$(top_srcdir)/include + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(CRYPTLIB) \ + $(XTRA_LIBS) diff --git a/helpers/basic_auth/getpwnam/Makefile.am b/helpers/basic_auth/getpwnam/Makefile.am index 8bc01b6475..3c0eff0d38 100644 --- a/helpers/basic_auth/getpwnam/Makefile.am +++ b/helpers/basic_auth/getpwnam/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.3 2003/01/23 00:35:47 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,5 +11,13 @@ libexec_PROGRAMS = getpwname_auth getpwname_auth_SOURCES = getpwnam_auth.c -INCLUDES = -I$(top_srcdir)/include -LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(CRYPTLIB) \ + $(XTRA_LIBS) diff --git a/helpers/basic_auth/mswin_sspi/Makefile.am b/helpers/basic_auth/mswin_sspi/Makefile.am index 1b60e1fc21..5bebac8bcc 100644 --- a/helpers/basic_auth/mswin_sspi/Makefile.am +++ b/helpers/basic_auth/mswin_sspi/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.2 2005/11/22 19:45:04 serassio Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,9 +11,15 @@ libexec_PROGRAMS = mswin_auth mswin_auth_SOURCES = mswin_auth.c valid.c valid.h -LDADD = -L$(top_builddir)/lib -lnetapi32 -ladvapi32 -lsspwin32 \ - -lmiscutil $(XTRA_LIBS) +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + -lnetapi32 -ladvapi32 -lsspwin32 \ + $(XTRA_LIBS) -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include EXTRA_DIST = readme.txt diff --git a/helpers/basic_auth/squid_radius_auth/Makefile.am b/helpers/basic_auth/squid_radius_auth/Makefile.am index b13266f915..5e117c24cd 100644 --- a/helpers/basic_auth/squid_radius_auth/Makefile.am +++ b/helpers/basic_auth/squid_radius_auth/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid LDAP authentication helper # -# $Id: Makefile.am,v 1.2 2007/11/20 14:34:17 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -15,5 +15,12 @@ squid_radius_auth_SOURCES = \ radius-util.c \ radius-util.h -LDADD = -L$(top_builddir)/lib -lmiscutil $(SSLLIB) $(XTRA_LIBS) -INCLUDES = -I$(top_srcdir)/include +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(SSLLIB) \ + $(XTRA_LIBS) diff --git a/helpers/digest_auth/eDirectory/Makefile.am b/helpers/digest_auth/eDirectory/Makefile.am index 18174fdd2b..3e780bb766 100644 --- a/helpers/digest_auth/eDirectory/Makefile.am +++ b/helpers/digest_auth/eDirectory/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.1 2007/06/23 20:50:10 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -13,7 +13,18 @@ digest_edir_auth_SOURCES = digest_pw_auth.c \ ldap_backend.h \ edir_ldapext.c \ edir_ldapext.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/ -LDADD = -L$(top_builddir)/lib -lmiscutil $(LIB_LDAP) $(LIB_LBER) $(CRYPTLIB) $(XTRA_LIBS) $(SSLLIB) +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(LIB_LDAP) \ + $(LIB_LBER) \ + $(CRYPTLIB) \ + $(XTRA_LIBS) \ + $(SSLLIB) diff --git a/helpers/digest_auth/ldap/Makefile.am b/helpers/digest_auth/ldap/Makefile.am index 5c85579402..b28b4786ae 100644 --- a/helpers/digest_auth/ldap/Makefile.am +++ b/helpers/digest_auth/ldap/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.2 2005/12/29 02:43:02 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,7 +11,18 @@ digest_ldap_auth_SOURCES = digest_pw_auth.c \ digest_common.h \ ldap_backend.c \ ldap_backend.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/ -LDADD = -L$(top_builddir)/lib -lmiscutil $(LIB_LDAP) $(LIB_LBER) $(CRYPTLIB) $(XTRA_LIBS) $(SSLLIB) +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(LIB_LDAP) \ + $(LIB_LBER) \ + $(CRYPTLIB) \ + $(XTRA_LIBS) \ + $(SSLLIB) diff --git a/helpers/digest_auth/password/Makefile.am b/helpers/digest_auth/password/Makefile.am index 934d2ec53e..dedc6737af 100644 --- a/helpers/digest_auth/password/Makefile.am +++ b/helpers/digest_auth/password/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.6 2005/12/30 23:21:46 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,7 +11,16 @@ digest_pw_auth_SOURCES = digest_pw_auth.c \ digest_common.h \ text_backend.c \ text_backend.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/ -LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) $(SSLLIB) +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(CRYPTLIB) \ + $(XTRA_LIBS) \ + $(SSLLIB) diff --git a/helpers/external_acl/ip_user/Makefile.am b/helpers/external_acl/ip_user/Makefile.am index 8748e8afa6..b6943424d0 100644 --- a/helpers/external_acl/ip_user/Makefile.am +++ b/helpers/external_acl/ip_user/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the ip_user external_acl helper by Rodrigo Campos # -# $Id: Makefile.am,v 1.4 2004/08/14 22:54:52 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -15,7 +15,6 @@ ip_user_check_SOURCES = \ main.c \ match.c - EXTRA_DIST = \ example.conf \ example-deny_all_but.conf \ @@ -24,5 +23,13 @@ EXTRA_DIST = \ # sysconf_DATA = -LDADD = -L$(top_builddir)/lib -lmiscutil @XTRA_LIBS@ -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + @XTRA_LIBS@ diff --git a/helpers/external_acl/ldap_group/Makefile.am b/helpers/external_acl/ldap_group/Makefile.am index 7e08f39cc5..3c5ee69aef 100644 --- a/helpers/external_acl/ldap_group/Makefile.am +++ b/helpers/external_acl/ldap_group/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid LDAP authentication helper # -# $Id: Makefile.am,v 1.6 2005/03/19 15:24:07 serassio Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,5 +11,15 @@ man_MANS = squid_ldap_group.8 EXTRA_DIST = squid_ldap_group.8 squid_ldap_group_SOURCES = squid_ldap_group.c -LDADD = -L$(top_builddir)/lib -lmiscutil $(LIB_LDAP) $(LIB_LBER) @XTRA_LIBS@ -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(LIB_LDAP) \ + $(LIB_LBER) \ + @XTRA_LIBS@ diff --git a/helpers/external_acl/mswin_ad_group/Makefile.am b/helpers/external_acl/mswin_ad_group/Makefile.am index 3de5897439..3e8a66f53f 100644 --- a/helpers/external_acl/mswin_ad_group/Makefile.am +++ b/helpers/external_acl/mswin_ad_group/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.1 2008/05/17 10:23:13 serassio Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,9 +11,16 @@ libexec_PROGRAMS = mswin_check_ad_group mswin_check_ad_group_SOURCES = mswin_check_ad_group.c mswin_check_ad_group.h -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include -LDADD = -L$(top_builddir)/lib -lmiscutil -lnetapi32 -ladvapi32 \ - -lntdll $(XTRA_LIBS) +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + -lnetapi32 \ + -ladvapi32 \ + -lntdll \ + $(XTRA_LIBS) EXTRA_DIST = readme.txt diff --git a/helpers/external_acl/mswin_lm_group/Makefile.am b/helpers/external_acl/mswin_lm_group/Makefile.am index 54bd4099b6..4fce8e5ff8 100644 --- a/helpers/external_acl/mswin_lm_group/Makefile.am +++ b/helpers/external_acl/mswin_lm_group/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.1 2005/10/31 16:29:45 serassio Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,9 +11,17 @@ libexec_PROGRAMS = mswin_check_lm_group mswin_check_lm_group_SOURCES = win32_check_group.c win32_check_group.h -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include -LDADD = -L$(top_builddir)/lib -lmiscutil -lnetapi32 -ladvapi32 \ - -lntdll $(XTRA_LIBS) +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + -lnetapi32 \ + -ladvapi32 \ + -lntdll \ + $(XTRA_LIBS) EXTRA_DIST = readme.txt diff --git a/helpers/external_acl/session/Makefile.am b/helpers/external_acl/session/Makefile.am index a7e3272723..4ed4e51f0e 100644 --- a/helpers/external_acl/session/Makefile.am +++ b/helpers/external_acl/session/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid LDAP authentication helper # -# $Id: Makefile.am,v 1.3 2006/03/20 23:38:23 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,6 +11,12 @@ man_MANS = squid_session.8 EXTRA_DIST = squid_session.8 squid_session_SOURCES = squid_session.c -LDADD = $(LIB_DB) +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + $(LIB_DB) diff --git a/helpers/external_acl/unix_group/Makefile.am b/helpers/external_acl/unix_group/Makefile.am index 51d0dcb8e9..3fb066105c 100644 --- a/helpers/external_acl/unix_group/Makefile.am +++ b/helpers/external_acl/unix_group/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid LDAP authentication helper # -# $Id: Makefile.am,v 1.4 2004/08/14 22:54:53 hno Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # @@ -11,5 +11,13 @@ man_MANS = squid_unix_group.8 EXTRA_DIST = squid_unix_group.8 squid_unix_group_SOURCES = check_group.c -LDADD = -L$(top_builddir)/lib -lmiscutil @XTRA_LIBS@ -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + @XTRA_LIBS@ diff --git a/helpers/external_acl/wbinfo_group/Makefile.am b/helpers/external_acl/wbinfo_group/Makefile.am index 7637c4827c..6de527bb95 100644 --- a/helpers/external_acl/wbinfo_group/Makefile.am +++ b/helpers/external_acl/wbinfo_group/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid LDAP authentication helper # -# $Id: Makefile.am,v 1.2 2003/01/23 00:36:16 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # diff --git a/helpers/ntlm_auth/fakeauth/Makefile.am b/helpers/ntlm_auth/fakeauth/Makefile.am index bde765a187..8e03d1783d 100644 --- a/helpers/ntlm_auth/fakeauth/Makefile.am +++ b/helpers/ntlm_auth/fakeauth/Makefile.am @@ -1,13 +1,22 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.2 2003/01/23 00:36:34 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # libexec_PROGRAMS = fakeauth_auth fakeauth_auth_SOURCES = fakeauth_auth.c ntlm.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/ -LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(CRYPTLIB) \ + $(XTRA_LIBS) diff --git a/helpers/ntlm_auth/mswin_sspi/Makefile.am b/helpers/ntlm_auth/mswin_sspi/Makefile.am index d45340e89a..d0eccfd099 100644 --- a/helpers/ntlm_auth/mswin_sspi/Makefile.am +++ b/helpers/ntlm_auth/mswin_sspi/Makefile.am @@ -1,16 +1,25 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.1 2005/10/30 21:48:22 serassio Exp $ +# $Id$ # libexec_PROGRAMS = mswin_ntlm_auth mswin_ntlm_auth_SOURCES = libntlmssp.c ntlm_auth.c ntlm.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include -LDADD = -L$(top_builddir)/lib -lntlmauth -lsspwin32 -lnetapi32 \ - -ladvapi32 -lmiscutil $(XTRA_LIBS) +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil -lntlmauth \ + -lsspwin32 \ + -lnetapi32 \ + -ladvapi32 \ + $(XTRA_LIBS) EXTRA_DIST = readme.txt diff --git a/helpers/ntlm_auth/no_check/Makefile.am b/helpers/ntlm_auth/no_check/Makefile.am index 6ff9968444..fdfc314741 100644 --- a/helpers/ntlm_auth/no_check/Makefile.am +++ b/helpers/ntlm_auth/no_check/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.4 2003/01/23 00:36:38 robertc Exp $ +# $Id$ # # Uncomment and customize the following to suit your needs: # diff --git a/helpers/ntlm_auth/smb_lm/Makefile.am b/helpers/ntlm_auth/smb_lm/Makefile.am index 4f63f10f1e..70e1f1622e 100644 --- a/helpers/ntlm_auth/smb_lm/Makefile.am +++ b/helpers/ntlm_auth/smb_lm/Makefile.am @@ -6,7 +6,18 @@ SUBDIRS = smbval libexec_PROGRAMS = ntlm_smb_lm_auth ntlm_smb_lm_auth_SOURCES = libntlmssp.c ntlm_smb_lm_auth.c ntlm_smb_lm_auth.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/ -I$(srcdir)/smbval -LDADD = smbval/libsmbvalid.a -L$(top_builddir)/lib -lntlmauth \ - -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) + +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src \ + -I$(srcdir)/smbval + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lntlmauth -lmiscutil \ + smbval/libsmbvalid.a \ + $(CRYPTLIB) \ + $(XTRA_LIBS) diff --git a/helpers/ntlm_auth/smb_lm/smbval/Makefile.am b/helpers/ntlm_auth/smb_lm/smbval/Makefile.am index d783611d79..85993914b8 100644 --- a/helpers/ntlm_auth/smb_lm/smbval/Makefile.am +++ b/helpers/ntlm_auth/smb_lm/smbval/Makefile.am @@ -1,9 +1,13 @@ # makefile for smblib -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/ +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include noinst_LIBRARIES = libsmbvalid.a + libsmbvalid_a_SOURCES = valid.c session.c rfcnb-util.c rfcnb-io.c \ smblib-util.c smblib.c smbencrypt.c smbdes.c md4.c byteorder.h \ rfcnb-error.h rfcnb-util.h smbencrypt.h smblib.h valid.h \ diff --git a/include/config.h b/include/config.h index 132bb3f7a1..a050ff9e8b 100644 --- a/include/config.h +++ b/include/config.h @@ -55,7 +55,7 @@ *--------------------------------------------------------------------------* ****************************************************************************/ -#include "compat/compat.h" +#include "compat.h" #ifdef USE_POSIX_REGEX #ifndef USE_RE_SYNTAX diff --git a/lib/Makefile.am b/lib/Makefile.am index 8ae663884c..79e22767bb 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -47,13 +47,12 @@ WIN32SRC= endif EXTRA_LIBRARIES = \ - libregex.a \ libsspwin32.a noinst_LIBRARIES = \ libmiscutil.a \ libntlmauth.a \ - $(LIBSSPWIN32) \ - @LIBREGEX@ + $(LIBSSPWIN32) + # # dirent.c, encrypt.c and getopt.c are needed for native Windows support. # @@ -99,8 +98,6 @@ libmiscutil_a_LIBADD = \ libTrie/src/TrieNode.o \ @LIBOBJS@ # $(top_srcdir)/include/version.h should be a dependency -libregex_a_SOURCES = \ - GNUregex.c libntlmauth_a_SOURCES = \ ntlmauth.c libntlmauth_a_LIBADD = \ @@ -108,7 +105,7 @@ libntlmauth_a_LIBADD = \ libsspwin32_a_SOURCES = \ sspwin32.c -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/src +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/libsquid-compat ##FIXME - set these in configure.in and reuse check_PROGRAMS= \ diff --git a/lib/GNUregex.c b/libsquid-compat/GnuRegex.c similarity index 99% rename from lib/GNUregex.c rename to libsquid-compat/GnuRegex.c index d19f66caf0..5a143772e3 100644 --- a/lib/GNUregex.c +++ b/libsquid-compat/GnuRegex.c @@ -1,7 +1,3 @@ -/* - * $Id: GNUregex.c,v 1.22 2007/12/14 23:11:44 amosjeffries Exp $ - */ - /* Extended regular expression matching and search library, * version 0.12. * (Implements POSIX draft P10003.2/D11.2, except for @@ -34,6 +30,8 @@ #include "config.h" +#if USE_GNUREGEX /* only if squid needs it. Usually not */ + #if !HAVE_ALLOCA #define REGEX_MALLOC 1 #endif @@ -104,7 +102,7 @@ init_syntax_once(void) /* Get the interface, including the syntax bits. */ -#include "GNUregex.h" +#include "GnuRegex.h" /* Compile a fastmap for the compiled pattern in BUFFER; used to * accelerate searches. Return 0 if successful and -2 if was an @@ -2362,10 +2360,14 @@ typedef struct { * the pattern buffer. * * Returns 0 if we succeed, -2 if an internal error. */ - +#ifdef STDC_HEADERS +int +re_compile_fastmap(struct re_pattern_buffer *bufp) +#else int re_compile_fastmap(bufp) struct re_pattern_buffer *bufp; +#endif { int j, k; fail_stack_type fail_stack; @@ -4401,6 +4403,7 @@ regex_t *preg; free(preg->translate); preg->translate = NULL; } +#endif /* USE_GNUREGEX */ /* * Local variables: diff --git a/src/compat/GnuRegex.h b/libsquid-compat/GnuRegex.h similarity index 100% rename from src/compat/GnuRegex.h rename to libsquid-compat/GnuRegex.h diff --git a/src/compat/Makefile.am b/libsquid-compat/Makefile.am similarity index 63% rename from src/compat/Makefile.am rename to libsquid-compat/Makefile.am index 486834af80..62b680d6c4 100644 --- a/src/compat/Makefile.am +++ b/libsquid-compat/Makefile.am @@ -9,20 +9,23 @@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ DEFS = @DEFS@ CLEANFILES = -INCLUDES = -I$(top_srcdir)/src @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/include -I$(top_builddir)/lib +INCLUDES = -I. -I$(top_srcdir)/src @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/include -I$(top_builddir)/lib $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h # Ideally this would be 100% inline functions and macro wrappers. # Port Specific Configurations -noinst_LTLIBRARIES = libcompat.la +noinst_LTLIBRARIES = libsquid-compat.la -libcompat_la_SOURCES = \ +libsquid_compat_la_SOURCES = \ compat.h \ osdetect.h \ compat_shared.h \ + gnuregex.h \ squid_fdsetsize.h \ + squid_stdvarargs.h \ + squid_valgrind.h \ \ os/squid_aix.h \ os/squid_freebsd.h \ @@ -37,7 +40,8 @@ libcompat_la_SOURCES = \ os/squid_sunos.h \ os/squid_windows.h \ \ - compat.cc + compat.cc \ + GnuRegex.c check_PROGRAMS= testHeaders @@ -45,24 +49,11 @@ TESTS= $(check_PROGRAMS) ## Special Universal .h dependency test script ## aborts if error encountered -testHeaders: $(top_srcdir)/src/compat/*.h $(top_srcdir)/src/compat/os/*.h - $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/compat/" || exit 1 - $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/compat/os/" || exit 1 +testHeaders: $(top_srcdir)/libsquid-compat/*.h $(top_srcdir)/libsquid-compat/os/*.h + $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/libsquid-compat/" || exit 1 + $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/libsquid-compat/os/" || exit 1 ## No such file... testHeaders.c: touch testHeaders.c CLEANFILES += testHeaders.c - -# -#testIpAddress_SOURCES= \ -# testIpAddress.cc \ -# testIpAddress.h -#nodist_testIpAddress_SOURCES= \ -# ../tests/testMain.cc -#testIpAddress_LDADD= \ -# libip.la \ -# -L$(top_builddir)/lib -lmiscutil \ -# @SQUID_CPPUNIT_LA@ \ -# @SQUID_CPPUNIT_LIBS@ -#testIpAddress_LDFLAGS= $(LIBADD_DL) diff --git a/src/compat/assert.h b/libsquid-compat/assert.h similarity index 100% rename from src/compat/assert.h rename to libsquid-compat/assert.h diff --git a/src/compat/compat.cc b/libsquid-compat/compat.cc similarity index 100% rename from src/compat/compat.cc rename to libsquid-compat/compat.cc diff --git a/src/compat/compat.h b/libsquid-compat/compat.h similarity index 95% rename from src/compat/compat.h rename to libsquid-compat/compat.h index 7fe6d011fc..d959778bf7 100644 --- a/src/compat/compat.h +++ b/libsquid-compat/compat.h @@ -24,14 +24,14 @@ /* Define the _SQUID_TYPE_ based on a guess of the OS */ /* NP: this MUST come first within compat.h */ /******************************************************/ -#include "compat/osdetect.h" +#include "osdetect.h" /*****************************************************/ /* FDSETSIZE is messy and needs to be done before */ /* sys/types.h are defined. */ /*****************************************************/ -#include "compat/squid_fdsetsize.h" +#include "squid_fdsetsize.h" /*****************************************************/ @@ -68,7 +68,7 @@ #include "compat_shared.h" #include "squid_stdvarargs.h" -#include "compat/assert.h" +#include "assert.h" /*****************************************************/ /* component-specific portabilities */ @@ -85,7 +85,7 @@ * Default is to use a system provided one, but the bundle * may be used instead with explicit configuration. */ -#include "compat/GnuRegex.h" +#include "GnuRegex.h" #endif /* _SQUID_COMPAT_H */ diff --git a/src/compat/compat_shared.h b/libsquid-compat/compat_shared.h similarity index 92% rename from src/compat/compat_shared.h rename to libsquid-compat/compat_shared.h index ac65194eb5..a2bc9a4e9b 100644 --- a/src/compat/compat_shared.h +++ b/libsquid-compat/compat_shared.h @@ -54,14 +54,19 @@ /* * Filedescriptor limits in the different select loops + * + * NP: FreeBSD 7 defines FD_SETSIZE as unsigned but Squid needs + * it to be signed to compare it with signed values. + * Linux and others including FreeBSD <7, define it as signed. + * If this causes any issues please contact squid-dev@squid-cache.org */ #if defined(USE_SELECT) || defined(USE_SELECT_WIN32) /* Limited by design */ -# define SQUID_MAXFD_LIMIT FD_SETSIZE +# define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE) #elif defined(USE_POLL) /* Limited due to delay pools */ -# define SQUID_MAXFD_LIMIT FD_SETSIZE +# define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE) #elif defined(USE_KQUEUE) || defined(USE_EPOLL) # define SQUID_FDSET_NOUSE 1 diff --git a/src/compat/os/squid_aix.h b/libsquid-compat/os/squid_aix.h similarity index 97% rename from src/compat/os/squid_aix.h rename to libsquid-compat/os/squid_aix.h index e1485b6d86..3286eb49a4 100644 --- a/src/compat/os/squid_aix.h +++ b/libsquid-compat/os/squid_aix.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_AIX_H diff --git a/src/compat/os/squid_freebsd.h b/libsquid-compat/os/squid_freebsd.h similarity index 97% rename from src/compat/os/squid_freebsd.h rename to libsquid-compat/os/squid_freebsd.h index 8213539acc..e4fb395942 100644 --- a/src/compat/os/squid_freebsd.h +++ b/libsquid-compat/os/squid_freebsd.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_FREEBSD_H diff --git a/src/compat/os/squid_hpux.h b/libsquid-compat/os/squid_hpux.h similarity index 97% rename from src/compat/os/squid_hpux.h rename to libsquid-compat/os/squid_hpux.h index dce7d811e7..993d14d4c4 100644 --- a/src/compat/os/squid_hpux.h +++ b/libsquid-compat/os/squid_hpux.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_HPUX_H diff --git a/src/compat/os/squid_linux.h b/libsquid-compat/os/squid_linux.h similarity index 97% rename from src/compat/os/squid_linux.h rename to libsquid-compat/os/squid_linux.h index b8fb3b7685..947de9870a 100644 --- a/src/compat/os/squid_linux.h +++ b/libsquid-compat/os/squid_linux.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_LINUX_H diff --git a/src/compat/os/squid_mswin.h b/libsquid-compat/os/squid_mswin.h similarity index 99% rename from src/compat/os/squid_mswin.h rename to libsquid-compat/os/squid_mswin.h index b375035289..fd0860c9fa 100644 --- a/src/compat/os/squid_mswin.h +++ b/libsquid-compat/os/squid_mswin.h @@ -32,7 +32,7 @@ * */ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_MSWIN_H diff --git a/src/compat/os/squid_next.h b/libsquid-compat/os/squid_next.h similarity index 98% rename from src/compat/os/squid_next.h rename to libsquid-compat/os/squid_next.h index 5f91ac4f6e..5278f1c375 100644 --- a/src/compat/os/squid_next.h +++ b/libsquid-compat/os/squid_next.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_NEXT_H diff --git a/src/compat/os/squid_openbsd.h b/libsquid-compat/os/squid_openbsd.h similarity index 97% rename from src/compat/os/squid_openbsd.h rename to libsquid-compat/os/squid_openbsd.h index 680f5f8dc0..eae2cdf003 100644 --- a/src/compat/os/squid_openbsd.h +++ b/libsquid-compat/os/squid_openbsd.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_OPENBSD_H diff --git a/src/compat/os/squid_qnx.h b/libsquid-compat/os/squid_qnx.h similarity index 96% rename from src/compat/os/squid_qnx.h rename to libsquid-compat/os/squid_qnx.h index d01572850d..f1f49405b5 100644 --- a/src/compat/os/squid_qnx.h +++ b/libsquid-compat/os/squid_qnx.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_QNX_H diff --git a/src/compat/os/squid_sgi.h b/libsquid-compat/os/squid_sgi.h similarity index 97% rename from src/compat/os/squid_sgi.h rename to libsquid-compat/os/squid_sgi.h index 8222256a4a..5fc9e67ac3 100644 --- a/src/compat/os/squid_sgi.h +++ b/libsquid-compat/os/squid_sgi.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_SGI_H diff --git a/src/compat/os/squid_solaris.h b/libsquid-compat/os/squid_solaris.h similarity index 98% rename from src/compat/os/squid_solaris.h rename to libsquid-compat/os/squid_solaris.h index 7afd978ef2..40ffdb7ce6 100644 --- a/src/compat/os/squid_solaris.h +++ b/libsquid-compat/os/squid_solaris.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_SOLARIS_H diff --git a/src/compat/os/squid_sunos.h b/libsquid-compat/os/squid_sunos.h similarity index 97% rename from src/compat/os/squid_sunos.h rename to libsquid-compat/os/squid_sunos.h index c229be86d5..25f891e5da 100644 --- a/src/compat/os/squid_sunos.h +++ b/libsquid-compat/os/squid_sunos.h @@ -1,5 +1,5 @@ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_SUNOS_H diff --git a/src/compat/os/squid_windows.h b/libsquid-compat/os/squid_windows.h similarity index 98% rename from src/compat/os/squid_windows.h rename to libsquid-compat/os/squid_windows.h index a52687d4f1..ad11de15c7 100644 --- a/src/compat/os/squid_windows.h +++ b/libsquid-compat/os/squid_windows.h @@ -31,7 +31,7 @@ * */ #ifndef SQUID_CONFIG_H -#include "squid.h" +#include "config.h" #endif #ifndef SQUID_OS_WINDOWS_H diff --git a/src/compat/osdetect.h b/libsquid-compat/osdetect.h similarity index 100% rename from src/compat/osdetect.h rename to libsquid-compat/osdetect.h diff --git a/src/compat/squid_fdsetsize.h b/libsquid-compat/squid_fdsetsize.h similarity index 100% rename from src/compat/squid_fdsetsize.h rename to libsquid-compat/squid_fdsetsize.h diff --git a/src/compat/squid_stdvarargs.h b/libsquid-compat/squid_stdvarargs.h similarity index 100% rename from src/compat/squid_stdvarargs.h rename to libsquid-compat/squid_stdvarargs.h diff --git a/src/compat/squid_valgrind.h b/libsquid-compat/squid_valgrind.h similarity index 100% rename from src/compat/squid_valgrind.h rename to libsquid-compat/squid_valgrind.h diff --git a/snmplib/Makefile.am b/snmplib/Makefile.am index c7655f264e..bac6f1bec5 100644 --- a/snmplib/Makefile.am +++ b/snmplib/Makefile.am @@ -10,7 +10,7 @@ libsnmp_a_SOURCES = asn1.c parse.c snmp_vars.c \ mib.c snmp_api_error.c \ snmp_msg.c \ snmp_pdu.c snmplib_debug.c -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/libsquid-compat VERSION = 3.4 DEFS = -DSQUID_SNMP=1 diff --git a/src/ICAP/Makefile.am b/src/ICAP/Makefile.am index 0767983ff7..f36cdd216e 100644 --- a/src/ICAP/Makefile.am +++ b/src/ICAP/Makefile.am @@ -3,6 +3,7 @@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ CLEANFILES = INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ -I$(top_builddir)/include \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src diff --git a/src/Makefile.am b/src/Makefile.am index 9e16c4ebb2..7b8b6851a5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -210,9 +210,15 @@ EXTRA_LIBRARIES = libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a noinst_LIBRARIES = @DISK_LIBS@ noinst_LTLIBRARIES = libsquid.la libauth.la -INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib/libTrie/include -INCLUDES += -I$(top_builddir)/lib -I$(top_srcdir)/lib -INCLUDES += @SQUID_CPPUNIT_INC@ +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib/libTrie/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib \ + @SQUID_CPPUNIT_INC@ EXTRA_PROGRAMS = \ DiskIO/DiskDaemon/diskd \ diff --git a/src/adaptation/Makefile.am b/src/adaptation/Makefile.am index 11a760b9c7..f4ddb9a4bb 100644 --- a/src/adaptation/Makefile.am +++ b/src/adaptation/Makefile.am @@ -3,6 +3,7 @@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ CLEANFILES = INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ -I$(top_builddir)/include \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am index 66ac094c85..d2725e7480 100644 --- a/src/auth/Makefile.am +++ b/src/auth/Makefile.am @@ -1,6 +1,6 @@ # Makefile for authentication modules in the Squid Object Cache server # -# $Id: Makefile.am,v 1.6 2005/10/23 11:55:38 hno Exp $ +# $Id$ # AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = @SQUID_CFLAGS@ @@ -15,7 +15,11 @@ libdigest_a_SOURCES = digest/auth_digest.cc digest/auth_digest.h libntlm_a_SOURCES = ntlm/auth_ntlm.cc ntlm/auth_ntlm.h libnegotiate_a_SOURCES = negotiate/auth_negotiate.cc negotiate/auth_negotiate.h negotiate/negotiateScheme.cc negotiate/negotiateScheme.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ -I$(top_srcdir)/src check_PROGRAMS= testHeaders diff --git a/src/eCAP/Makefile.am b/src/eCAP/Makefile.am index d52aac9b90..98ab01eec1 100644 --- a/src/eCAP/Makefile.am +++ b/src/eCAP/Makefile.am @@ -22,5 +22,9 @@ libeCAP_la_SOURCES = \ \ Registry.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ -I$(top_srcdir)/src diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index 119cf213cd..36f3e65e8d 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -1,6 +1,6 @@ # Makefile for storage modules in the Squid Object Cache server # -# $Id: Makefile.am,v 1.15 2008/01/08 11:10:48 amosjeffries Exp $ +# $Id$ # AUTOMAKE_OPTIONS = subdir-objects @@ -28,7 +28,11 @@ EXTRA_DIST = \ coss/StoreFScoss.h \ ufs/StoreFSufs.h -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ -I$(top_srcdir)/src check_PROGRAMS=testHeaders diff --git a/src/icmp/Makefile.am b/src/icmp/Makefile.am index dbdc3debd0..e4e8d1e12b 100644 --- a/src/icmp/Makefile.am +++ b/src/icmp/Makefile.am @@ -9,7 +9,13 @@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ DEFS = @DEFS@ CLEANFILES = -INCLUDES = -I$(top_srcdir)/src @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/include -I$(top_builddir)/lib +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + @SQUID_CPPUNIT_INC@ + $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h # TODO: get rid of this when config filename is no longer a global constant. diff --git a/src/ip/Makefile.am b/src/ip/Makefile.am index e36db69f4b..d075c3390a 100644 --- a/src/ip/Makefile.am +++ b/src/ip/Makefile.am @@ -9,7 +9,13 @@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ DEFS = @DEFS@ CLEANFILES = -INCLUDES = -I$(top_srcdir)/src @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/include -I$(top_builddir)/lib +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/src \ + @SQUID_CPPUNIT_INC@ + $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h @@ -46,6 +52,7 @@ testIpAddress_SOURCES= \ nodist_testIpAddress_SOURCES= \ ../tests/testMain.cc testIpAddress_LDADD= \ + $(top_builddir)/libsquid-compat/libsquid-compat.la \ libip.la \ -L$(top_builddir)/lib -lmiscutil \ @SQUID_CPPUNIT_LA@ \ diff --git a/src/repl/Makefile.am b/src/repl/Makefile.am index 1f08d0ef87..303036fc5a 100644 --- a/src/repl/Makefile.am +++ b/src/repl/Makefile.am @@ -1,6 +1,6 @@ # Makefile for storage modules in the Squid Object Cache server # -# $Id: Makefile.am,v 1.7 2005/08/20 21:08:38 serassio Exp $ +# $Id$ # AUTOMAKE_OPTIONS = subdir-objects @@ -16,7 +16,11 @@ noinst_LIBRARIES = @REPL_LIBS@ liblru_a_SOURCES = lru/store_repl_lru.cc libheap_a_SOURCES = heap/store_heap_replacement.h heap/store_heap_replacement.cc heap/store_repl_heap.cc -INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \ +INCLUDES = \ + -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ -I$(top_srcdir)/src check_PROGRAMS= testHeaders diff --git a/src/squid.h b/src/squid.h index 6c551af9fe..defc840967 100644 --- a/src/squid.h +++ b/src/squid.h @@ -186,26 +186,6 @@ using namespace Squid; #endif /* HAVE_POLL_H */ #endif /* USE_POLL */ -/* - * Filedescriptor limits in the different select loops - * - * NP: FreeBSD 7 defines FD_SETSIZE as unsigned but Squid needs - * it to be signed to compare it with signed values. - * Linux and others including FreeBSD <7, define it as signed. - * If this causes any issues please contact squid-dev@squid-cache.org - */ -#if defined(USE_SELECT) || defined(USE_SELECT_WIN32) -/* Limited by design */ -# define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE) -#elif defined(USE_POLL) -/* Limited due to delay pools */ -# define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE) -#elif defined(USE_KQUEUE) || defined(USE_EPOLL) -# define SQUID_FDSET_NOUSE 1 -#else -# error Unknown select loop model! -#endif - /* * Trap unintentional use of fd_set. Must not be used outside the @@ -219,35 +199,6 @@ using namespace Squid; # endif #endif -#if defined(HAVE_STDARG_H) -#include -#define HAVE_STDARGS /* let's hope that works everywhere (mj) */ -#define VA_LOCAL_DECL va_list ap; -#define VA_START(f) va_start(ap, f) -#define VA_SHIFT(v,t) ; /* no-op for ANSI */ -#define VA_END va_end(ap) -#else -#if defined(HAVE_VARARGS_H) -#include -#undef HAVE_STDARGS -#define VA_LOCAL_DECL va_list ap; -#define VA_START(f) va_start(ap) /* f is ignored! */ -#define VA_SHIFT(v,t) v = va_arg(ap,t) -#define VA_END va_end(ap) -#else -#error XX **NO VARARGS ** XX -#endif -#endif - -/* Make sure syslog goes after stdarg/varargs */ -#ifdef HAVE_SYSLOG_H -#ifdef _SQUID_AIX_ -#define _XOPEN_EXTENDED_SOURCE -#define _XOPEN_SOURCE_EXTENDED 1 -#endif -#include -#endif - #if HAVE_MATH_H #include #endif @@ -261,13 +212,6 @@ using namespace Squid; #define MAXPATHLEN SQUID_MAXPATHLEN #endif -#if !HAVE_GETRUSAGE -#if defined(_SQUID_HPUX_) -#define HAVE_GETRUSAGE 1 -#define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b) -#endif -#endif - #if !HAVE_STRUCT_RUSAGE /* * If we don't have getrusage() then we create a fake structure @@ -324,20 +268,6 @@ SQUIDCEXTERN size_t getpagesize(void); #define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) #endif -#ifdef USE_GNUREGEX -#ifdef __cplusplus -extern "C" -{ -#endif -#include "GNUregex.h" -#ifdef __cplusplus -} - -#endif -#elif HAVE_REGEX_H -#include -#endif - #include "md5.h" #if USE_SSL diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index c089074c87..9ce219d90e 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.20 2007/01/04 20:52:57 hno Exp $ +# $Id$ # AUTOMAKE_OPTIONS = subdir-objects @@ -9,9 +9,20 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = @SQUID_CFLAGS@ AM_CXXFLAGS = @SQUID_CXXFLAGS@ -INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src +INCLUDES = -I$(top_srcdir)/libsquid-compat \ + -I. \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src + +LDADD = \ + -L$(top_builddir)/libsquid-compat/libsquid-compat.la \ + -L$(top_builddir)/lib -lmiscutil \ + $(top_builddir)/src/globals.o \ + $(top_builddir)/src/time.o EXTRA_PROGRAMS = mem_node_test membanger splay tcp-banger2 rfc1738 + EXTRA_DIST = testheaders.sh ESI_ALL_TESTS = \ @@ -50,7 +61,6 @@ check_PROGRAMS= debug \ VirtualDeleteOperator -LDADD =$(top_builddir)/src/globals.o $(top_builddir)/src/time.o -L$(top_builddir)/lib -lmiscutil tcp_banger2_LDADD = -L$(top_builddir)/lib -lmiscutil DEBUG_SOURCE = test_tools.cc debug_SOURCES = debug.cc $(DEBUG_SOURCE) diff --git a/tools/Makefile.am b/tools/Makefile.am index e898cc11c6..9147394ef8 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -8,6 +8,7 @@ AUTOMAKE_OPTIONS = subdir-objects INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib/libTrie/include -I$(top_srcdir)/src +INCLUDES += -I$(top_srcdir)/libsquid-compat INCLUDES += @SQUID_CPPUNIT_INC@ TESTS=$(check_PROGRAMS)