]> granicus.if.org Git - postgis/commitdiff
Add header guards to geos headers, move GEOS_PREPARED define to the implementation...
authorSandro Santilli <strk@keybit.net>
Wed, 21 Sep 2011 09:50:15 +0000 (09:50 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 21 Sep 2011 09:50:15 +0000 (09:50 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7879 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_geos.c
postgis/lwgeom_geos.h
postgis/lwgeom_geos_prepared.h
postgis/profile.h

index 9a896f95ef46b06d3ed360c1f08f80cf004ac130..8ce24ef655990b949229b1819ca8a7084b6070c6 100644 (file)
 #include "lwgeom_geos.h"
 #include "liblwgeom_internal.h"
 #include "lwgeom_rtree.h"
-#include "lwgeom_geos_prepared.h" /* for PREPARED_GEOM define */
 #include "lwgeom_functions_analytic.h" /* for point_in_polygon */
 #include "funcapi.h"
 
+/*
+** GEOS prepared geometry is only available from GEOS 3.1 onwards
+*/
+#define PREPARED_GEOM
+
+#ifdef PREPARED_GEOM
+#include "lwgeom_geos_prepared.h" 
+#endif
+
 #include <string.h>
 #include <assert.h>
 
index 604197fb936650cb9172711b1a87b3aaf76e1ed9..dcc4f00e1fb49ccbcdf2562574580d0f79d3f852 100644 (file)
@@ -10,6 +10,9 @@
  *
  **********************************************************************/
 
+#ifndef LWGEOM_GEOS_H_
+#define LWGEOM_GEOS_H_ 1
+
 #include "postgres.h"
 #include "fmgr.h"
 #include "miscadmin.h"
 
 #include "../postgis_config.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"
 #include "profile.h"
@@ -50,3 +46,4 @@ GEOSGeometry * POSTGIS2GEOS(PG_LWGEOM *g);
 
 void errorIfGeometryCollection(PG_LWGEOM *g1, PG_LWGEOM *g2);
 
+#endif /* LWGEOM_GEOS_H_ 1 */
index 7107ce9e364db109428b3cd323266fb118c13609..81eeadc616ff82431f75fa7423a8613de4a030a6 100644 (file)
@@ -10,6 +10,9 @@
  *
  **********************************************************************/
 
+#ifndef LWGEOM_GEOS_PREPARED_H_
+#define LWGEOM_GEOS_PREPARED_H_ 1
+
 #include "postgres.h"
 #include "fmgr.h"
 #include "miscadmin.h"
 
 #include "../postgis_config.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"
 #include "lwgeom_geos.h"
 
-/*
-** GEOS prepared geometry is only available from GEOS 3.1 onwards
-*/
-#define PREPARED_GEOM
-
 /*
 ** Cache structure. We use PG_LWGEOM as keys so no transformations
 ** are needed before we memcmp them with other keys. We store the
@@ -45,7 +36,6 @@
 ** Both the Geometry and the PreparedGeometry have to be cached,
 ** because the PreparedGeometry contains a reference to the geometry.
 */
-#ifdef PREPARED_GEOM
 typedef struct
 {
        char                          type;
@@ -70,6 +60,4 @@ PrepGeomCache;
 */
 PrepGeomCache *GetPrepGeomCache(FunctionCallInfoData *fcinfo, PG_LWGEOM *pg_geom1, PG_LWGEOM *pg_geom2);
 
-
-#endif /* PREPARED_GEOM */
-
+#endif /* LWGEOM_GEOS_PREPARED_H_ 1 */
index 8598f36396939f5430d5f815fec8cd4e093aeb5a..239ca7097b1fc81da06c5b8638a7c9609c51a59b 100644 (file)
@@ -1,3 +1,15 @@
+/**********************************************************************
+ *
+ * PostGIS - Spatial Types for PostgreSQL
+ * http://postgis.refractions.net
+ *
+ * Copyright (C) 2004 Sandro Santilli <strk@keybit.net>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU General Public Licence. See the COPYING file.
+ *
+ **********************************************************************/
+
 #ifndef _PROFILE_H
 #define _PROFILE_H 1