From cd6f7e1ea8bb86885c1caae87e4e98f24a817123 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 9 Feb 2012 17:16:29 +0000 Subject: [PATCH] More postgis_config.h inclusion removal from headers git-svn-id: http://svn.osgeo.org/postgis/trunk@9135 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/lwgeom_geos.c | 22 +++++++++++++++++++--- postgis/lwgeom_geos.h | 23 ++--------------------- postgis/lwgeom_geos_clean.c | 7 ++++++- postgis/lwgeom_geos_prepared.c | 1 + postgis/lwgeom_geos_prepared.h | 2 -- postgis/lwgeom_geos_relatematch.c | 6 ++++++ 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index 031f2b446..14f6202f4 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -12,12 +12,23 @@ * **********************************************************************/ +/* TODO: we probaby don't need _all_ these pgsql headers */ +#include "postgres.h" +#include "fmgr.h" +#include "miscadmin.h" +#include "utils/array.h" +#include "utils/builtins.h" +#include "utils/hsearch.h" +#include "utils/memutils.h" +#include "executor/spi.h" +#include "funcapi.h" + +#include "../postgis_config.h" +#include "lwgeom_functions_analytic.h" /* for point_in_polygon */ +#include "lwgeom_cache.h" #include "lwgeom_geos.h" #include "liblwgeom_internal.h" #include "lwgeom_rtree.h" -#include "lwgeom_functions_analytic.h" /* for point_in_polygon */ -#include "funcapi.h" -#include "lwgeom_cache.h" /* ** GEOS prepared geometry is only available from GEOS 3.1 onwards @@ -31,6 +42,11 @@ #include #include +#if POSTGIS_PROFILE > 0 +#warning POSTGIS_PROFILE enabled! +#endif + + /* ** Prototypes for SQL-bound functions */ diff --git a/postgis/lwgeom_geos.h b/postgis/lwgeom_geos.h index 146f6fa0c..c93e68dcd 100644 --- a/postgis/lwgeom_geos.h +++ b/postgis/lwgeom_geos.h @@ -13,27 +13,8 @@ #ifndef LWGEOM_GEOS_H_ #define LWGEOM_GEOS_H_ 1 -#include "postgres.h" -#include "fmgr.h" -#include "miscadmin.h" -#include "utils/array.h" -#include "utils/builtins.h" -#include "utils/hsearch.h" -#include "utils/memutils.h" -#include "executor/spi.h" - -#include "../postgis_config.h" - -#include "lwgeom_pg.h" -#include "liblwgeom.h" -#include "../liblwgeom/liblwgeom.h" -#include "../liblwgeom/lwgeom_geos.h" - -#include - -#if POSTGIS_PROFILE > 0 -#warning POSTGIS_PROFILE enabled! -#endif +#include "../liblwgeom/lwgeom_geos.h" /* for GEOSGeom */ +#include "liblwgeom.h" /* for GSERIALIZED */ /* ** Public prototypes for GEOS utility functions. diff --git a/postgis/lwgeom_geos_clean.c b/postgis/lwgeom_geos_clean.c index 1d04b1666..fb4075112 100644 --- a/postgis/lwgeom_geos_clean.c +++ b/postgis/lwgeom_geos_clean.c @@ -35,10 +35,15 @@ * **********************************************************************/ +#include "postgres.h" +#include "fmgr.h" +#include "funcapi.h" + +#include "../postgis_config.h" #include "lwgeom_geos.h" #include "liblwgeom.h" #include "liblwgeom_internal.h" -#include "funcapi.h" +#include "lwgeom_pg.h" #include #include diff --git a/postgis/lwgeom_geos_prepared.c b/postgis/lwgeom_geos_prepared.c index 8b76b9089..18d620007 100644 --- a/postgis/lwgeom_geos_prepared.c +++ b/postgis/lwgeom_geos_prepared.c @@ -14,6 +14,7 @@ #include +#include "../postgis_config.h" #include "lwgeom_geos_prepared.h" #include "lwgeom_cache.h" diff --git a/postgis/lwgeom_geos_prepared.h b/postgis/lwgeom_geos_prepared.h index 7465bb05d..c32977ee6 100644 --- a/postgis/lwgeom_geos_prepared.h +++ b/postgis/lwgeom_geos_prepared.h @@ -20,8 +20,6 @@ #include "utils/memutils.h" #include "access/hash.h" -#include "../postgis_config.h" - #include "lwgeom_pg.h" #include "liblwgeom.h" #include "lwgeom_geos.h" diff --git a/postgis/lwgeom_geos_relatematch.c b/postgis/lwgeom_geos_relatematch.c index c0c9b6167..48d53569f 100644 --- a/postgis/lwgeom_geos_relatematch.c +++ b/postgis/lwgeom_geos_relatematch.c @@ -24,7 +24,13 @@ * **********************************************************************/ +#include "postgres.h" +#include "fmgr.h" +#include "funcapi.h" + +#include "../postgis_config.h" #include "lwgeom_geos.h" +#include "lwgeom_pg.h" #include #include -- 2.40.0