From 63f93bc9bd7d7de38af9b63681b3394f2d7255c3 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Wed, 6 Sep 2017 05:39:59 +0000 Subject: [PATCH] address_standardizer fix initialization from incompatible pointer type for PostgreSQL >= 9.6 Closes #3830 git-svn-id: http://svn.osgeo.org/postgis/trunk@15636 b70326c6-7e19-0410-871a-916f4a2858ee --- extensions/address_standardizer/std_pg_hash.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/extensions/address_standardizer/std_pg_hash.c b/extensions/address_standardizer/std_pg_hash.c index b4a760d99..68377141c 100644 --- a/extensions/address_standardizer/std_pg_hash.c +++ b/extensions/address_standardizer/std_pg_hash.c @@ -14,7 +14,7 @@ /* standardizer headers */ #undef DEBUG //#define DEBUG 1 - +#include "../../postgis_config.h" #include "pagc_api.h" #include "pagc_std_api.h" #include "std_pg_hash.h" @@ -96,7 +96,13 @@ static void StdCacheInit(MemoryContext context); static void StdCacheReset(MemoryContext context); static void StdCacheDelete(MemoryContext context); static bool StdCacheIsEmpty(MemoryContext context); + +#if POSTGIS_PGSQL_VERSION >= 96 +static void StdCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals); +#else static void StdCacheStats(MemoryContext context, int level); +#endif + #ifdef MEMORY_CONTEXT_CHECKING static void StdCacheCheck(MemoryContext context); #endif @@ -180,19 +186,28 @@ StdCacheIsEmpty(MemoryContext context) } +#if POSTGIS_PGSQL_VERSION >= 96 +static void +StdCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals) +{ + // another required function + fprintf(stderr, "%s: STANDARDIZER context\n", context->name); +} +#else static void StdCacheStats(MemoryContext context, int level) { // another required function fprintf(stderr, "%s: STANDARDIZER context\n", context->name); } +#endif #ifdef MEMORY_CONTEXT_CHECKING static void StdCacheCheck(MemoryContext context) { - // NOP - another reuired function + // NOP - another required function } #endif -- 2.40.0