r339 - in trunk/varnish-cache: bin/varnishd lib/libvarnishapi

des at projects.linpro.no des at projects.linpro.no
Thu Jul 6 10:43:53 CEST 2006


Author: des
Date: 2006-07-06 10:43:53 +0200 (Thu, 06 Jul 2006)
New Revision: 339

Modified:
   trunk/varnish-cache/bin/varnishd/cache_shmlog.c
   trunk/varnish-cache/bin/varnishd/storage_file.c
   trunk/varnish-cache/lib/libvarnishapi/shmlog.c
Log:
Portability: don't use non-portable mmap(2) flags.

Modified: trunk/varnish-cache/bin/varnishd/cache_shmlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_shmlog.c	2006-07-06 08:43:02 UTC (rev 338)
+++ trunk/varnish-cache/bin/varnishd/cache_shmlog.c	2006-07-06 08:43:53 UTC (rev 339)
@@ -18,6 +18,14 @@
 
 #include "heritage.h"
 
+#ifndef MAP_HASSEMAPHORE
+#define MAP_HASSEMAPHORE 0 /* XXX Linux */
+#endif
+
+#ifndef MAP_NOSYNC
+#define MAP_NOSYNC 0 /* XXX Linux */
+#endif
+
 struct varnish_stats *VSL_stats;
 
 static struct shmloghead *loghead;

Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c	2006-07-06 08:43:02 UTC (rev 338)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c	2006-07-06 08:43:53 UTC (rev 339)
@@ -25,6 +25,14 @@
 #include "shmlog.h"
 #include "cache.h"
 
+#ifndef MAP_NOCORE
+#define MAP_NOCORE 0 /* XXX Linux */
+#endif
+
+#ifndef MAP_NOSYNC
+#define MAP_NOSYNC 0 /* XXX Linux */
+#endif
+
 #define MINPAGES		128
 
 /*--------------------------------------------------------------------*/

Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2006-07-06 08:43:02 UTC (rev 338)
+++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2006-07-06 08:43:53 UTC (rev 339)
@@ -13,6 +13,10 @@
 #include "shmlog.h"
 #include "varnishapi.h"
 
+#ifndef MAP_HASSEMAPHORE
+#define MAP_HASSEMAPHORE 0 /* XXX Linux */
+#endif
+
 static unsigned char *logstart, *logend;
 
 struct shmloghead *




More information about the varnish-commit mailing list