]> err.no Git - varnish/commitdiff
Portability: use -lsocket / -lns on systems that need it (read Solaris),
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 25 Sep 2007 08:21:28 +0000 (08:21 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 25 Sep 2007 08:21:28 +0000 (08:21 +0000)
use <sys/queue.h> instead of our own if present.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2032 d4fa192b-c00b-0410-8231-f00ffab90ce4

15 files changed:
varnish-cache/bin/varnishadm/Makefile.am
varnish-cache/bin/varnishd/Makefile.am
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/heritage.h
varnish-cache/bin/varnishd/mgt_event.h
varnish-cache/bin/varnishd/mgt_vcc.c
varnish-cache/bin/varnishd/stevedore.h
varnish-cache/bin/varnishreplay/Makefile.am
varnish-cache/bin/varnishreplay/varnishreplay.c
varnish-cache/bin/varnishtop/varnishtop.c
varnish-cache/configure.ac
varnish-cache/lib/libvarnish/Makefile.am
varnish-cache/lib/libvcl/vcc_compile.c
varnish-cache/lib/libvcl/vcc_compile.h
varnish-cache/lib/libvcl/vcc_token.c

index e2f37f2ace64f67809b296031007a7de7d856762..0efdd23c181a60e65d333930da5a29815355441d 100644 (file)
@@ -13,4 +13,5 @@ varnishadm_CFLAGS = -include config.h
 
 varnishadm_LDADD = \
        $(top_builddir)/lib/libvarnish/libvarnish.la \
-       $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la
+       $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
+       ${NET_LIBS}
index 956a1ab276ecfc52e8d3242ed6cc3486193cc2e9..a2b0b8492a8419e21e161a0e8fedd044a1813873 100644 (file)
@@ -70,4 +70,4 @@ varnishd_LDADD = \
        $(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}
index 3384710e070c54896b164abdb01c5a16fd00cb9b..bec6b2dcb865e62d815482199a931d297ee721d6 100644 (file)
 #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"
index 27902b6b5d97822795cb65efd3b319764b0dedea..6c783007666d6aa37da047f50290a1ed4e601ceb 100644 (file)
  */
 
 #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;
index 68b547be76e1201d2b1e69c67b9b187e4980082a..c224cdd9b23f6d26661b9fdf412fe5c5b53a7864 100644 (file)
  */
 
 #include <poll.h>
+
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
 #include "queue.h"
+#endif
 
 struct ev;
 struct evbase;
index cc69b0498ae2bd35f2b115be72ba43780e80e747..36a29ef0e915c672dd2672bbc0ecc3e1c3d1b7c6 100644 (file)
 #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"
index 1d1ba1b6aa7b0a532a49248ebf71ef4f3739a46d..91d45ba4d3eb63b55b291e7e4a13890987e5463e 100644 (file)
  * $Id$
  */
 
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
 #include "queue.h"
+#endif
 
 struct stevedore;
 struct sess;
index fb079fb9b81a9cdfa7057436849916c82b359e7a..bef4a6fb2f04bf1b67dccae681737055c6a5e77e 100644 (file)
@@ -15,5 +15,4 @@ varnishreplay_LDADD = \
        $(top_builddir)/lib/libvarnish/libvarnish.la \
        $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
        $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
-       ${PTHREAD_LIBS}
-
+       ${PTHREAD_LIBS} ${NET_LIBS}
index 1b86efe690fb7c49e2474e8277243e7ad16f4b48..f34984dc1e6a4da6fba73c949f2f8633f0beb6fc 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
-#include "libvarnish.h"
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
 #include "queue.h"
+#endif
+
+#include "libvarnish.h"
 #include "varnishapi.h"
 #include "vss.h"
 
index a4d28af8662643f889540e4638471ad0cc7428e5..dca9ff6728fa4a704a546fcab594cad8fffe3155 100644 (file)
 #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 {
index 9326c22eb5e4945a08f249af3b752c1b3f25cf82..4540e4e0c33837a444912960f84d5d957d2af824 100644 (file)
@@ -50,6 +50,14 @@ PTHREAD_LIBS="${LIBS}"
 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_SUBST(LIBM)
 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])
index 278286ee24e1534bb0b1c878f72ddbb6a9ca60df..c377ae8df268fdddfe6e6f43f3745153079d428f 100644 (file)
@@ -20,4 +20,4 @@ libvarnish_la_SOURCES = \
 
 libvarnish_la_CFLAGS = -include config.h
 
-libvarnish_la_LIBADD = ${RT_LIBS}
+libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS}
index bf09a7f51082eadee23a9984624adccdd722f4de..f3f839788a90ca57b92f81b79cad4fa819d3036c 100644 (file)
@@ -60,6 +60,8 @@
  *     and all the rest...
  */
 
+#include <sys/stat.h>
+
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #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"
index 4d8b8a4a0cd45641418b5e1ec79088c4238d69c3..0ae1ec648bebd5a881fca1f90219a24c6a1c66b8 100644 (file)
  * $Id$
  */
 
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
 #include "queue.h"
+#endif
+
 #include "vcl_returns.h"
 
 #define INDENT         2
index 37e41ce8d2ec46035d5cfa45e86cca2ff6370231..d193be5ca3a446dbbc93d70a446e2a96e1d3ac1f 100644 (file)
 #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"