[postgis-commits] svn - r3262 - trunk/lwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Thu Nov 6 08:12:12 PST 2008
Author: mcayland
Date: 2008-11-06 08:12:11 -0800 (Thu, 06 Nov 2008)
New Revision: 3262
Modified:
trunk/lwgeom/lwgeom_geos.h
trunk/lwgeom/lwgeom_geos_prepared.h
Log:
The GEOS 2.2 series "geos_c.h" is missing header guards, so including the header multiple times as is done in lwgeom_geos.h and lwgeom_geos_prepared.h causes compilation to fail with multiple definition errors. This patch fixes this problem allowing GEOS 2.2 to work with PostGIS once again, although of course it can easily be removed when it is decided that GEOS 2.2 support is no longer required.
Modified: trunk/lwgeom/lwgeom_geos.h
===================================================================
--- trunk/lwgeom/lwgeom_geos.h 2008-11-06 15:15:06 UTC (rev 3261)
+++ trunk/lwgeom/lwgeom_geos.h 2008-11-06 16:12:11 UTC (rev 3262)
@@ -23,7 +23,12 @@
#include "utils/memutils.h"
#include "executor/spi.h"
+/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain
+ header guards to protect from multiple inclusion */
+#ifndef GEOS_C_INCLUDED
+#define GEOS_C_INCLUDED
#include "geos_c.h"
+#endif
#include "lwgeom_pg.h"
#include "liblwgeom.h"
Modified: trunk/lwgeom/lwgeom_geos_prepared.h
===================================================================
--- trunk/lwgeom/lwgeom_geos_prepared.h 2008-11-06 15:15:06 UTC (rev 3261)
+++ trunk/lwgeom/lwgeom_geos_prepared.h 2008-11-06 16:12:11 UTC (rev 3262)
@@ -19,7 +19,12 @@
#include "utils/memutils.h"
#include "access/hash.h"
+/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain
+ header guards to protect from multiple inclusion */
+#ifndef GEOS_C_INCLUDED
+#define GEOS_C_INCLUDED
#include "geos_c.h"
+#endif
#include "lwgeom_pg.h"
#include "liblwgeom.h"
More information about the postgis-commits
mailing list