[postgis-users] Problem building postgis
Michael Fuhr
mike at fuhr.org
Thu Nov 16 22:58:39 PST 2006
On Mon, Nov 13, 2006 at 11:22:14PM -0500, John Daly wrote:
> I'm a new list subscriber and I'd like to say hello to all, and also, of
> course, introduce my first problem using postgis. I'm trying to build
> postgis on Redhat 9, with Postgres version 8.1.5 and postgis ver 1.1.6.
> I'm getting the build errors shown below:
>
> lwgeom_gist.c:547:1: directives may not be used inside a macro argument
Does the attached patch fix the problem?
--
Michael Fuhr
-------------- next part --------------
Index: lwgeom/lwgeom_gist.c
===================================================================
--- lwgeom/lwgeom_gist.c (revision 2528)
+++ lwgeom/lwgeom_gist.c (working copy)
@@ -542,14 +542,17 @@
if (in != (PG_LWGEOM*)DatumGetPointer(entry->key))
pfree(in); /* PG_FREE_IF_COPY */
+#if USE_VERSION >= 82
gistentryinit(*retval, PointerGetDatum(rr),
entry->rel, entry->page,
-#if USE_VERSION >= 82
entry->offset,
+ FALSE);
#else
+ gistentryinit(*retval, PointerGetDatum(rr),
+ entry->rel, entry->page,
entry->offset, sizeof(BOX2DFLOAT4),
+ FALSE);
#endif
- FALSE);
}
else
@@ -557,10 +560,12 @@
#ifdef PGIS_DEBUG_GIST4
elog(NOTICE,"GIST: LWGEOM_gist_compress got a NULL key");
#endif
+
+#if USE_VERSION >= 82
gistentryinit(*retval, (Datum) 0, entry->rel,
-#if USE_VERSION >= 82
entry->page, entry->offset, FALSE);
#else
+ gistentryinit(*retval, (Datum) 0, entry->rel,
entry->page, entry->offset, 0, FALSE);
#endif
}
More information about the postgis-users
mailing list