r2032 - in trunk/varnish-cache: . bin/varnishadm bin/varnishd bin/varnishreplay bin/varnishtop lib/libvarnish lib/libvcl
des at projects.linpro.no
des at projects.linpro.no
Tue Sep 25 10:21:39 CEST 2007
Author: des
Date: 2007-09-25 10:21:28 +0200 (Tue, 25 Sep 2007)
New Revision: 2032
Modified:
trunk/varnish-cache/bin/varnishadm/Makefile.am
trunk/varnish-cache/bin/varnishd/Makefile.am
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/heritage.h
trunk/varnish-cache/bin/varnishd/mgt_event.h
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
trunk/varnish-cache/bin/varnishd/stevedore.h
trunk/varnish-cache/bin/varnishreplay/Makefile.am
trunk/varnish-cache/bin/varnishreplay/varnishreplay.c
trunk/varnish-cache/bin/varnishtop/varnishtop.c
trunk/varnish-cache/configure.ac
trunk/varnish-cache/lib/libvarnish/Makefile.am
trunk/varnish-cache/lib/libvcl/vcc_compile.c
trunk/varnish-cache/lib/libvcl/vcc_compile.h
trunk/varnish-cache/lib/libvcl/vcc_token.c
Log:
Portability: use -lsocket / -lns on systems that need it (read Solaris),
use <sys/queue.h> instead of our own if present.
Modified: trunk/varnish-cache/bin/varnishadm/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/varnishadm/Makefile.am 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishadm/Makefile.am 2007-09-25 08:21:28 UTC (rev 2032)
@@ -13,4 +13,5 @@
varnishadm_LDADD = \
$(top_builddir)/lib/libvarnish/libvarnish.la \
- $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la
+ $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
+ ${NET_LIBS}
Modified: trunk/varnish-cache/bin/varnishd/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/varnishd/Makefile.am 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishd/Makefile.am 2007-09-25 08:21:28 UTC (rev 2032)
@@ -70,4 +70,4 @@
$(top_builddir)/lib/libvarnish/libvarnish.la \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvcl/libvcl.la \
- ${DL_LIBS} ${PTHREAD_LIBS} ${LIBM}
+ ${DL_LIBS} ${PTHREAD_LIBS} ${NET_LIBS} ${LIBM}
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2007-09-25 08:21:28 UTC (rev 2032)
@@ -36,7 +36,12 @@
#include <pthread.h>
#include <stdint.h>
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
+
#include "vsb.h"
#include "libvarnish.h"
Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishd/heritage.h 2007-09-25 08:21:28 UTC (rev 2032)
@@ -32,7 +32,12 @@
*/
#include <pthread.h>
+
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
struct listen_sock {
TAILQ_ENTRY(listen_sock) list;
Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-09-25 08:21:28 UTC (rev 2032)
@@ -30,7 +30,12 @@
*/
#include <poll.h>
+
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
struct ev;
struct evbase;
Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-09-25 08:21:28 UTC (rev 2032)
@@ -44,7 +44,12 @@
#include "compat/asprintf.h"
#endif
#include "vsb.h"
+
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
#include "libvcl.h"
#include "cli.h"
Modified: trunk/varnish-cache/bin/varnishd/stevedore.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/stevedore.h 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishd/stevedore.h 2007-09-25 08:21:28 UTC (rev 2032)
@@ -29,7 +29,11 @@
* $Id$
*/
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
struct stevedore;
struct sess;
Modified: trunk/varnish-cache/bin/varnishreplay/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/varnishreplay/Makefile.am 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishreplay/Makefile.am 2007-09-25 08:21:28 UTC (rev 2032)
@@ -15,5 +15,4 @@
$(top_builddir)/lib/libvarnish/libvarnish.la \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
- ${PTHREAD_LIBS}
-
+ ${PTHREAD_LIBS} ${NET_LIBS}
Modified: trunk/varnish-cache/bin/varnishreplay/varnishreplay.c
===================================================================
--- trunk/varnish-cache/bin/varnishreplay/varnishreplay.c 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishreplay/varnishreplay.c 2007-09-25 08:21:28 UTC (rev 2032)
@@ -38,8 +38,13 @@
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
+#include "queue.h"
+#endif
+
#include "libvarnish.h"
-#include "queue.h"
#include "varnishapi.h"
#include "vss.h"
Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c
===================================================================
--- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-09-25 08:21:28 UTC (rev 2032)
@@ -43,11 +43,16 @@
#include <unistd.h>
#include <limits.h>
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
+#include "queue.h"
+#endif
+
#include "vsb.h"
#include "libvarnish.h"
#include "shmlog.h"
-#include "queue.h"
#include "varnishapi.h"
struct top {
Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/configure.ac 2007-09-25 08:21:28 UTC (rev 2032)
@@ -50,6 +50,14 @@
LIBS="${save_LIBS}"
AC_SUBST(PTHREAD_LIBS)
+save_LIBS="${LIBS}"
+LIBS=""
+AC_CHECK_LIB(socket, socket)
+AC_CHECK_LIB(getaddrinfo, ns)
+NET_LIBS="${LIBS}"
+LIBS="${save_LIBS}"
+AC_SUBST(NET_LIBS)
+
AC_CHECK_LIBM
AC_SUBST(LIBM)
@@ -57,6 +65,7 @@
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
+AC_CHECK_HEADERS([sys/queue.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([sys/mount.h])
AC_CHECK_HEADERS([sys/vfs.h])
Modified: trunk/varnish-cache/lib/libvarnish/Makefile.am
===================================================================
--- trunk/varnish-cache/lib/libvarnish/Makefile.am 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/lib/libvarnish/Makefile.am 2007-09-25 08:21:28 UTC (rev 2032)
@@ -20,4 +20,4 @@
libvarnish_la_CFLAGS = -include config.h
-libvarnish_la_LIBADD = ${RT_LIBS}
+libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS}
Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-09-25 08:21:28 UTC (rev 2032)
@@ -60,6 +60,8 @@
* and all the rest...
*/
+#include <sys/stat.h>
+
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -69,10 +71,13 @@
#include <string.h>
#include <unistd.h>
-#include <sys/stat.h>
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
+#include "queue.h"
+#endif
#include "vsb.h"
-#include "queue.h"
#include "vcc_priv.h"
#include "vcc_compile.h"
Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-09-25 08:21:28 UTC (rev 2032)
@@ -29,7 +29,12 @@
* $Id$
*/
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
+
#include "vcl_returns.h"
#define INDENT 2
Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_token.c 2007-09-25 08:19:50 UTC (rev 2031)
+++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2007-09-25 08:21:28 UTC (rev 2032)
@@ -34,9 +34,14 @@
#include <stdlib.h>
#include <string.h>
-#include "vsb.h"
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
#include "queue.h"
+#endif
+#include "vsb.h"
+
#include "libvarnish.h"
#include "vcc_priv.h"
#include "vcc_compile.h"
More information about the varnish-commit
mailing list