From phk at projects.linpro.no Tue Dec 5 08:47:43 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 5 Dec 2006 09:47:43 +0100 (CET) Subject: r1226 - in trunk/varnish-cache: . bin/varnishd Message-ID: <20061205084743.656C41EC42C@projects.linpro.no> Author: phk Date: 2006-12-05 09:47:43 +0100 (Tue, 05 Dec 2006) New Revision: 1226 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/configure.ac Log: NetBSD Portability fix: Starting with 3.1, NetBSD uses statvfs and not statfs. Submitted by: Juan RP Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-11-09 10:25:47 UTC (rev 1225) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-05 08:47:43 UTC (rev 1226) @@ -37,6 +37,11 @@ #include #include +#ifdef HAVE_SYS_STATVFS_H +#include +#define statfs statvfs +#endif + #ifdef HAVE_SYS_VFS_H #include #endif Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2006-11-09 10:25:47 UTC (rev 1225) +++ trunk/varnish-cache/configure.ac 2006-12-05 08:47:43 UTC (rev 1226) @@ -45,6 +45,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([sys/statvfs.h]) AC_CHECK_HEADERS([sys/vfs.h]) AC_CHECK_HEADERS([netinet/in.h]) AC_CHECK_HEADERS([stddef.h]) From phk at projects.linpro.no Tue Dec 5 08:48:27 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 5 Dec 2006 09:48:27 +0100 (CET) Subject: r1227 - trunk/varnish-cache Message-ID: <20061205084827.3E9691EC3FC@projects.linpro.no> Author: phk Date: 2006-12-05 09:48:27 +0100 (Tue, 05 Dec 2006) New Revision: 1227 Modified: trunk/varnish-cache/autogen.sh Log: Add a FreeBSD workaround while des@ tries to get autocrap to DTRT under FreeBSD also. Modified: trunk/varnish-cache/autogen.sh =================================================================== --- trunk/varnish-cache/autogen.sh 2006-12-05 08:47:43 UTC (rev 1226) +++ trunk/varnish-cache/autogen.sh 2006-12-05 08:48:27 UTC (rev 1227) @@ -26,7 +26,12 @@ set -ex -aclocal +if [ "x`uname -s`" = "xFreeBSD" ] ; then + # Ask DES + aclocal -I /usr/local/share/aclocal +else + aclocal +fi libtoolize --copy --force autoheader automake --add-missing --copy --foreign From phk at projects.linpro.no Tue Dec 5 09:41:16 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 5 Dec 2006 10:41:16 +0100 (CET) Subject: r1228 - trunk/varnish-cache/bin/varnishd Message-ID: <20061205094116.2988A1EC408@projects.linpro.no> Author: phk Date: 2006-12-05 10:41:16 +0100 (Tue, 05 Dec 2006) New Revision: 1228 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Make the statfs(3)/statvfs(3) dictomy actually work. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-05 08:48:27 UTC (rev 1227) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-05 09:41:16 UTC (rev 1228) @@ -39,7 +39,6 @@ #ifdef HAVE_SYS_STATVFS_H #include -#define statfs statvfs #endif #ifdef HAVE_SYS_VFS_H @@ -122,12 +121,21 @@ char suff[2]; int i, expl; off_t o; - struct statfs fsst; struct stat st; + AN(sc != NULL); AZ(fstat(sc->fd, &st)); + +#ifdef HAVE_SYS_STATVFS_H + struct statfs fsst; AZ(fstatfs(sc->fd, &fsst)); +#endif +#ifdef HAVE_SYS_VFS_H + struct statfs fsst; + AZ(fstatfs(sc->fd, &fsst)); +#endif + /* We use units of the larger of filesystem blocksize and pagesize */ bs = sc->pagesize; if (bs < fsst.f_bsize) From des at projects.linpro.no Tue Dec 5 11:42:39 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 5 Dec 2006 12:42:39 +0100 (CET) Subject: r1229 - trunk/varnish-cache Message-ID: <20061205114239.F1ECC1EC29A@projects.linpro.no> Author: des Date: 2006-12-05 12:42:39 +0100 (Tue, 05 Dec 2006) New Revision: 1229 Modified: trunk/varnish-cache/autogen.sh Log: Better workaround for FreeBSD autotools brokenness. Pointy hat to: {ade,portsmgr}@freebsd.org Modified: trunk/varnish-cache/autogen.sh =================================================================== --- trunk/varnish-cache/autogen.sh 2006-12-05 09:41:16 UTC (rev 1228) +++ trunk/varnish-cache/autogen.sh 2006-12-05 11:42:39 UTC (rev 1229) @@ -6,6 +6,7 @@ if [ -d /usr/local/gnu-autotools/bin ] ; then PATH=/usr/local/gnu-autotools/bin:${PATH} export PATH + FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal" fi automake_version=$(automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+') @@ -26,12 +27,7 @@ set -ex -if [ "x`uname -s`" = "xFreeBSD" ] ; then - # Ask DES - aclocal -I /usr/local/share/aclocal -else - aclocal -fi +aclocal ${FIX_BROKEN_FREEBSD_PORTS} libtoolize --copy --force autoheader automake --add-missing --copy --foreign From knutroy at projects.linpro.no Mon Dec 18 15:58:59 2006 From: knutroy at projects.linpro.no (knutroy at projects.linpro.no) Date: Mon, 18 Dec 2006 16:58:59 +0100 (CET) Subject: r1230 - trunk/varnish-cache/bin/varnishd Message-ID: <20061218155859.BD2341EC2BE@projects.linpro.no> Author: knutroy Date: 2006-12-18 16:58:59 +0100 (Mon, 18 Dec 2006) New Revision: 1230 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Fixed double declaraction error on systems having both HAVE_SYS_STATVFS_H and HAVE_SYS_VFS_H. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-05 11:42:39 UTC (rev 1229) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-18 15:58:59 UTC (rev 1230) @@ -126,16 +126,11 @@ AN(sc != NULL); AZ(fstat(sc->fd, &st)); -#ifdef HAVE_SYS_STATVFS_H +#if defined(HAVE_SYS_STATVFS_H) || defined(HAVE_SYS_VFS_H) struct statfs fsst; AZ(fstatfs(sc->fd, &fsst)); #endif -#ifdef HAVE_SYS_VFS_H - struct statfs fsst; - AZ(fstatfs(sc->fd, &fsst)); -#endif - /* We use units of the larger of filesystem blocksize and pagesize */ bs = sc->pagesize; if (bs < fsst.f_bsize)