[master] 874655c Get the rest of the stuff in there too.

Poul-Henning Kamp phk at varnish-cache.org
Sun Oct 9 22:54:07 CEST 2011


commit 874655c0bd62f1be7b861b61012dc801cd59ddf8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun Oct 9 20:53:57 2011 +0000

    Get the rest of the stuff in there too.

diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c
index 464924a..63ab6a3 100644
--- a/bin/varnishd/cache_panic.c
+++ b/bin/varnishd/cache_panic.c
@@ -29,6 +29,8 @@
 
 #include "config.h"
 
+#include "vapi/vsm_int.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -40,7 +42,6 @@
 
 #include "cache.h"
 
-#include "vsm.h"
 #include "cache_backend.h"
 #include "cache_waiter.h"
 #include "vcl.h"
diff --git a/bin/varnishd/cache_shmlog.c b/bin/varnishd/cache_shmlog.c
index 75f662d..d16a744 100644
--- a/bin/varnishd/cache_shmlog.c
+++ b/bin/varnishd/cache_shmlog.c
@@ -29,11 +29,13 @@
 
 #include "config.h"
 
+
 #include <stdio.h>
 
 #include "cache.h"
+
+#include "vapi/vsm_int.h"
 #include "vmb.h"
-#include "vsm.h"
 #include "vtim.h"
 
 /* These cannot be struct lock, which depends on vsm/vsl working */
diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c
index e676f48..ac76594 100644
--- a/bin/varnishd/mgt_child.c
+++ b/bin/varnishd/mgt_child.c
@@ -43,7 +43,7 @@
 #include <sys/wait.h>
 
 #include "mgt.h"
-#include "vsm.h"
+#include "vapi/vsm_int.h"
 #include "heritage.h"
 #include "vcli.h"
 #include "cli_priv.h"
diff --git a/bin/varnishd/mgt_shmem.c b/bin/varnishd/mgt_shmem.c
index e42487a..8fa5cd9 100644
--- a/bin/varnishd/mgt_shmem.c
+++ b/bin/varnishd/mgt_shmem.c
@@ -101,7 +101,7 @@
 #include "mgt.h"
 #include "heritage.h"
 #include "vmb.h"
-#include "vsm.h"
+#include "vapi/vsm_int.h"
 #include "vav.h"
 #include "vnum.h"
 #include "flopen.h"
diff --git a/bin/varnishd/vsm.c b/bin/varnishd/vsm.c
index d1717fe..bc44c21 100644
--- a/bin/varnishd/vsm.c
+++ b/bin/varnishd/vsm.c
@@ -55,7 +55,7 @@
 #include "common.h"
 
 #include "vmb.h"
-#include "vsm.h"
+#include "vapi/vsm_int.h"
 #include "vtim.h"
 
 /* These two come from beyond (mgt_shmem.c actually) */
diff --git a/include/Makefile.am b/include/Makefile.am
index 320f18c..948cef7 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -16,12 +16,12 @@ pkginclude_HEADERS = \
 	tbl/vsc_fields.h \
 	tbl/vsl_tags.h \
 	vapi/vsm.h \
+	vapi/vsm_int.h \
 	vapi/vsc.h \
 	vapi/vsc_int.h \
 	vapi/vsl.h \
 	vapi/vsl_int.h \
-	vcli.h \
-	vsm.h
+	vcli.h
 
 nobase_noinst_HEADERS = \
 	binary_heap.h \
diff --git a/include/vapi/vsm_int.h b/include/vapi/vsm_int.h
index 98e8610..0055b73 100644
--- a/include/vapi/vsm_int.h
+++ b/include/vapi/vsm_int.h
@@ -31,13 +31,12 @@
  * NB: THIS IS NOT A PUBLIC API TO VARNISH!
  */
 
-#ifndef VSM_H_INCLUDED
-#define VSM_H_INCLUDED
+#ifndef VSM_INT_H_INCLUDED
+#define VSM_INT_H_INCLUDED
 
 #define VSM_FILENAME		"_.vsm"
 
-#include <time.h>
-#include <sys/types.h>
+#include <stdint.h>
 
 /*
  * This structure describes each allocation from the shmlog
@@ -62,9 +61,9 @@ struct VSM_head {
 
 	unsigned		hdrsize;
 
-	time_t			starttime;
-	pid_t			master_pid;
-	pid_t			child_pid;
+	uint64_t		starttime;
+	int64_t			master_pid;
+	int64_t			child_pid;
 
 	unsigned		shm_size;
 
@@ -107,6 +106,10 @@ vsm_iter_n(struct VSM_chunk **pp)
 
 #define VSM_ITER(vd) for ((vd) = vsm_iter_0(); (vd) != NULL; vsm_iter_n(&vd))
 
+#else
+
+#define VSM_ITER(vd) while (YOU_NEED_MINIOBJ_TO_USE_VSM_ITER)
+
 #endif /* CHECK_OBJ_NOTNULL */
 
-#endif
+#endif /* VSM_INT_H_INCLUDED */
diff --git a/lib/libvarnish/vin.c b/lib/libvarnish/vin.c
index 65fdb5e..cd3e7d0 100644
--- a/lib/libvarnish/vin.c
+++ b/lib/libvarnish/vin.c
@@ -30,6 +30,8 @@
 
 #include "config.h"
 
+#include "vapi/vsm_int.h"
+
 #include <errno.h>
 #include <limits.h>
 #include <stdio.h>
@@ -39,7 +41,6 @@
 #include "vas.h"
 #include "vdef.h"
 #include "vin.h"
-#include "vsm.h"
 
 int
 VIN_N_Arg(const char *n_arg, char **name, char **dir, char **vsl)
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index 74cf286..211d284 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -30,6 +30,7 @@
 #include "config.h"
 
 #include "vapi/vsm.h"
+#include "vapi/vsm_int.h"
 #include "vapi/vsc.h"
 
 #include <sys/types.h>
@@ -39,7 +40,6 @@
 
 #include "vas.h"
 #include "vav.h"
-#include "vsm.h"
 #include "vqueue.h"
 #include "miniobj.h"
 
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index a2efc5d..9fa6a48 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -30,6 +30,7 @@
 #include "config.h"
 
 #include "vapi/vsm.h"
+#include "vapi/vsm_int.h"
 #include "vapi/vsl.h"
 
 #include <sys/types.h>
@@ -41,7 +42,6 @@
 #include <unistd.h>
 
 #include "vas.h"
-#include "vsm.h"
 #include "vre.h"
 #include "vbm.h"
 #include "miniobj.h"
diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 32d9e3d..eeb2b3c 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -30,6 +30,7 @@
 #include "config.h"
 
 #include "vapi/vsm.h"
+#include "vapi/vsm_int.h"
 
 #include <stdint.h>
 #include <sys/types.h>
@@ -45,7 +46,6 @@
 
 #include "vas.h"
 #include "vin.h"
-#include "vsm.h"
 #include "vbm.h"
 #include "miniobj.h"
 



More information about the varnish-commit mailing list