From 86f2a3df3c5c25b4869d150e92879361683aaa4c Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 10 Mar 2009 20:15:27 +0000 Subject: [PATCH] Commit Mateusz's patch to move the postgres.h #include to the top of the file in order to aid the MSVC build. git-svn-id: http://svn.osgeo.org/postgis/trunk@3841 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/long_xact.c | 3 +-- postgis/lwgeom_box2dfloat4.c | 11 +++++------ postgis/lwgeom_box3d.c | 12 +++++------- postgis/lwgeom_btree.c | 12 ++++++------ postgis/lwgeom_chip.c | 11 +++++------ postgis/lwgeom_dump.c | 19 ++++++++++--------- postgis/lwgeom_estimate.c | 14 +++++++------- postgis/lwgeom_functions_basic.c | 12 ++++++------ postgis/lwgeom_geos.h | 8 ++++---- postgis/lwgeom_geos_prepared.h | 4 ++-- postgis/lwgeom_gist.c | 15 +++++++-------- postgis/lwgeom_inout.c | 4 ++-- postgis/lwgeom_pg.c | 10 +++++----- postgis/lwgeom_pg.h | 4 +++- postgis/lwgeom_sqlmm.c | 8 ++++---- postgis/lwgeom_transform.c | 12 ++++++------ 16 files changed, 78 insertions(+), 81 deletions(-) diff --git a/postgis/long_xact.c b/postgis/long_xact.c index d88ff437a..aa1c42cb9 100644 --- a/postgis/long_xact.c +++ b/postgis/long_xact.c @@ -1,11 +1,10 @@ -#include "lwgeom_pg.h" - #include "postgres.h" #include "access/xact.h" #include "executor/spi.h" /* this is what you need to work with SPI */ #include "commands/trigger.h" /* ... and triggers */ #include "utils/lsyscache.h" /* for get_namespace_name() */ +#include "lwgeom_pg.h" #define ABORT_ON_AUTH_FAILURE 1 diff --git a/postgis/lwgeom_box2dfloat4.c b/postgis/lwgeom_box2dfloat4.c index f992187cd..8a0159e97 100644 --- a/postgis/lwgeom_box2dfloat4.c +++ b/postgis/lwgeom_box2dfloat4.c @@ -1,9 +1,3 @@ -#include -#include -#include -#include -#include - #include "postgres.h" #include "access/gist.h" #include "access/itup.h" @@ -14,6 +8,11 @@ #include "lwgeom_pg.h" #include "liblwgeom.h" +#include +#include +#include +#include +#include /* forward defs */ diff --git a/postgis/lwgeom_box3d.c b/postgis/lwgeom_box3d.c index 8d08bfa04..1d430c4ad 100644 --- a/postgis/lwgeom_box3d.c +++ b/postgis/lwgeom_box3d.c @@ -4,12 +4,6 @@ * **********************************************************************/ -#include -#include -#include -#include -#include - #include "postgres.h" #include "fmgr.h" #include "utils/elog.h" @@ -18,7 +12,11 @@ #include "lwgeom_pg.h" #include "liblwgeom.h" - +#include +#include +#include +#include +#include #define SHOW_DIGS_DOUBLE 15 #define MAX_DIGS_DOUBLE (SHOW_DIGS_DOUBLE + 6 + 1 + 3 +1) diff --git a/postgis/lwgeom_btree.c b/postgis/lwgeom_btree.c index 9f20ed8a7..f93f9d83e 100644 --- a/postgis/lwgeom_btree.c +++ b/postgis/lwgeom_btree.c @@ -7,12 +7,6 @@ * ***********************************************************/ -#include -#include -#include -#include -#include - #include "postgres.h" #include "fmgr.h" #include "utils/geo_decls.h" @@ -20,6 +14,12 @@ #include "liblwgeom.h" #include "lwgeom_pg.h" +#include +#include +#include +#include +#include + Datum lwgeom_lt(PG_FUNCTION_ARGS); Datum lwgeom_le(PG_FUNCTION_ARGS); Datum lwgeom_eq(PG_FUNCTION_ARGS); diff --git a/postgis/lwgeom_chip.c b/postgis/lwgeom_chip.c index 86dab228a..ae3ccc683 100644 --- a/postgis/lwgeom_chip.c +++ b/postgis/lwgeom_chip.c @@ -1,9 +1,3 @@ -#include -#include -#include -#include -#include - #include "postgres.h" #include "access/gist.h" #include "access/itup.h" @@ -14,6 +8,11 @@ #include "lwgeom_pg.h" #include "liblwgeom.h" +#include +#include +#include +#include +#include /* Define this to debug CHIP ops */ /*#define DEBUG_CHIP 1*/ diff --git a/postgis/lwgeom_dump.c b/postgis/lwgeom_dump.c index 01c600bdb..821e6faa2 100644 --- a/postgis/lwgeom_dump.c +++ b/postgis/lwgeom_dump.c @@ -9,15 +9,6 @@ * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ -#include "../postgis_config.h" - -#include -#include -#include -#include -#include -#include - #include "postgres.h" #include "fmgr.h" #include "utils/elog.h" @@ -29,6 +20,16 @@ #include "lwgeom_pg.h" #include "profile.h" +#include "../postgis_config.h" + +#include +#include +#include +#include +#include +#include + + Datum LWGEOM_dump(PG_FUNCTION_ARGS); Datum LWGEOM_dump_rings(PG_FUNCTION_ARGS); diff --git a/postgis/lwgeom_estimate.c b/postgis/lwgeom_estimate.c index 8c8552f59..337b2e29c 100644 --- a/postgis/lwgeom_estimate.c +++ b/postgis/lwgeom_estimate.c @@ -10,13 +10,6 @@ * **********************************************************************/ -#include -#include -#include -#include -#include -#include - #include "postgres.h" #include "executor/spi.h" #include "fmgr.h" @@ -30,6 +23,13 @@ #include "liblwgeom.h" #include "lwgeom_pg.h" +#include +#include +#include +#include +#include +#include + /* * Assign a number to the postgis statistics kind * diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c index e2afe46c6..8a38af591 100644 --- a/postgis/lwgeom_functions_basic.c +++ b/postgis/lwgeom_functions_basic.c @@ -10,12 +10,6 @@ * **********************************************************************/ -#include -#include -#include -#include -#include - #include "postgres.h" #include "fmgr.h" #include "utils/elog.h" @@ -27,6 +21,12 @@ #include "lwgeom_pg.h" #include "profile.h" +#include +#include +#include +#include +#include + Datum LWGEOM_mem_size(PG_FUNCTION_ARGS); Datum LWGEOM_summary(PG_FUNCTION_ARGS); Datum LWGEOM_npoints(PG_FUNCTION_ARGS); diff --git a/postgis/lwgeom_geos.h b/postgis/lwgeom_geos.h index 5b528e41f..dccc0cc28 100644 --- a/postgis/lwgeom_geos.h +++ b/postgis/lwgeom_geos.h @@ -10,10 +10,6 @@ * **********************************************************************/ -#include - -#include "../postgis_config.h" - #include "postgres.h" #include "fmgr.h" #include "miscadmin.h" @@ -23,6 +19,8 @@ #include "utils/memutils.h" #include "executor/spi.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 @@ -34,6 +32,8 @@ #include "liblwgeom.h" #include "profile.h" +#include + #if POSTGIS_PROFILE > 0 #warning POSTGIS_PROFILE enabled! #endif diff --git a/postgis/lwgeom_geos_prepared.h b/postgis/lwgeom_geos_prepared.h index 8306f2d9c..fed357018 100644 --- a/postgis/lwgeom_geos_prepared.h +++ b/postgis/lwgeom_geos_prepared.h @@ -10,8 +10,6 @@ * **********************************************************************/ -#include "../postgis_config.h" - #include "postgres.h" #include "fmgr.h" #include "miscadmin.h" @@ -19,6 +17,8 @@ #include "utils/memutils.h" #include "access/hash.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 diff --git a/postgis/lwgeom_gist.c b/postgis/lwgeom_gist.c index 56fa17d22..4a6410fbe 100644 --- a/postgis/lwgeom_gist.c +++ b/postgis/lwgeom_gist.c @@ -1,11 +1,3 @@ -#include -#include -#include -#include -#include - -#include "../postgis_config.h" - #include "postgres.h" #include "access/gist.h" #include "access/itup.h" @@ -14,10 +6,17 @@ #include "fmgr.h" #include "utils/elog.h" +#include "../postgis_config.h" #include "liblwgeom.h" #include "lwgeom_pg.h" +#include +#include +#include +#include +#include + /* * implementation GiST support and basic LWGEOM operations (like &&) diff --git a/postgis/lwgeom_inout.c b/postgis/lwgeom_inout.c index 0f488548b..823fd677c 100644 --- a/postgis/lwgeom_inout.c +++ b/postgis/lwgeom_inout.c @@ -1,7 +1,7 @@ -#include "../postgis_config.h" - #include "postgres.h" +#include "../postgis_config.h" + #include #include #include diff --git a/postgis/lwgeom_pg.c b/postgis/lwgeom_pg.c index ef4869815..8a17c6352 100644 --- a/postgis/lwgeom_pg.c +++ b/postgis/lwgeom_pg.c @@ -1,14 +1,14 @@ -#include "../postgis_config.h" - -#include -#include -#include #include #include #include + +#include "../postgis_config.h" #include "liblwgeom.h" #include "lwgeom_pg.h" +#include +#include +#include #define PARANOIA_LEVEL 1 diff --git a/postgis/lwgeom_pg.h b/postgis/lwgeom_pg.h index 08a8c3145..fadeb6eef 100644 --- a/postgis/lwgeom_pg.h +++ b/postgis/lwgeom_pg.h @@ -1,10 +1,12 @@ #ifndef _LWGEOM_PG_H #define _LWGEOM_PG_H 1 -#include "../postgis_config.h" #include "postgres.h" #include "utils/geo_decls.h" #include "fmgr.h" + +#include "../postgis_config.h" + #include "liblwgeom.h" #include "pgsql_compat.h" diff --git a/postgis/lwgeom_sqlmm.c b/postgis/lwgeom_sqlmm.c index 9cc1b060f..63d3692fb 100644 --- a/postgis/lwgeom_sqlmm.c +++ b/postgis/lwgeom_sqlmm.c @@ -10,16 +10,16 @@ * **********************************************************************/ +#include "postgres.h" +#include "liblwgeom.h" +#include "fmgr.h" + #include #include #include #include #include -#include "postgres.h" -#include "liblwgeom.h" -#include "fmgr.h" - #include "lwgeom_pg.h" diff --git a/postgis/lwgeom_transform.c b/postgis/lwgeom_transform.c index c0edc25f1..bba63f2db 100644 --- a/postgis/lwgeom_transform.c +++ b/postgis/lwgeom_transform.c @@ -10,12 +10,6 @@ * **********************************************************************/ -#include -#include -#include -#include -#include - #include "postgres.h" #include "fmgr.h" #include "miscadmin.h" @@ -23,6 +17,12 @@ #include "liblwgeom.h" #include "lwgeom_pg.h" +#include +#include +#include +#include +#include + Datum transform(PG_FUNCTION_ARGS); Datum transform_geom(PG_FUNCTION_ARGS); -- 2.50.0