[postgis-tickets] r14460 - Remove warnings building against 9.6, closes #3385

Paul Ramsey pramsey at cleverelephant.ca
Mon Nov 30 10:39:50 PST 2015


Author: pramsey
Date: 2015-11-30 10:39:50 -0800 (Mon, 30 Nov 2015)
New Revision: 14460

Modified:
   trunk/libpgcommon/lwgeom_transform.c
   trunk/postgis/lwgeom_geos_prepared.c
Log:
Remove warnings building against 9.6, closes #3385


Modified: trunk/libpgcommon/lwgeom_transform.c
===================================================================
--- trunk/libpgcommon/lwgeom_transform.c	2015-11-30 17:54:09 UTC (rev 14459)
+++ trunk/libpgcommon/lwgeom_transform.c	2015-11-30 18:39:50 UTC (rev 14460)
@@ -92,7 +92,13 @@
 static void PROJ4SRSCacheDelete(MemoryContext context);
 static void PROJ4SRSCacheReset(MemoryContext context);
 static bool PROJ4SRSCacheIsEmpty(MemoryContext context);
+
+#if POSTGIS_PGSQL_VERSION >= 96
+static void PROJ4SRSCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals);
+#else
 static void PROJ4SRSCacheStats(MemoryContext context, int level);
+#endif
+
 #ifdef MEMORY_CONTEXT_CHECKING
 static void PROJ4SRSCacheCheck(MemoryContext context);
 #endif
@@ -165,7 +171,11 @@
 }
 
 static void
+#if POSTGIS_PGSQL_VERSION >= 96
+PROJ4SRSCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals)
+#else
 PROJ4SRSCacheStats(MemoryContext context, int level)
+#endif
 {
 	/*
 	 * Simple stats display function - we must supply a function since this call is mandatory according to tgl

Modified: trunk/postgis/lwgeom_geos_prepared.c
===================================================================
--- trunk/postgis/lwgeom_geos_prepared.c	2015-11-30 17:54:09 UTC (rev 14459)
+++ trunk/postgis/lwgeom_geos_prepared.c	2015-11-30 18:39:50 UTC (rev 14460)
@@ -86,7 +86,12 @@
 static void PreparedCacheReset(MemoryContext context);
 static void PreparedCacheDelete(MemoryContext context);
 static bool PreparedCacheIsEmpty(MemoryContext context);
+#if POSTGIS_PGSQL_VERSION >= 96
+static void PreparedCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals);
+#else
 static void PreparedCacheStats(MemoryContext context, int level);
+#endif
+
 #ifdef MEMORY_CONTEXT_CHECKING
 static void PreparedCacheCheck(MemoryContext context);
 #endif
@@ -160,14 +165,18 @@
 }
 
 static void
+#if POSTGIS_PGSQL_VERSION >= 96
+PreparedCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals)
+#else
 PreparedCacheStats(MemoryContext context, int level)
+#endif
 {
 	/*
 	 * Simple stats display function - we must supply a function since this call is mandatory according to tgl
 	 * (see postgis-devel archives July 2007)
+	   fprintf(stderr, "%s: Prepared context\n", context->name);
 	 */
 
-	fprintf(stderr, "%s: Prepared context\n", context->name);
 }
 
 #ifdef MEMORY_CONTEXT_CHECKING



More information about the postgis-tickets mailing list