Skip to content

Commit

Permalink
Drop postgis_config.h include from lwgeom_pg.h header.
Browse files Browse the repository at this point in the history
Generally, package config files should _not_ be included
by package headers. In this specific case the aim is overriding
POSTGIS_DEBUG_LEVEL in implementation files for the sake of
enabling debugging of a single file.

Also part of this commit is addition of copyright header in
two files which were missing it (used git history to figure
assignments)

git-svn-id: http://svn.osgeo.org/postgis/trunk@9134 b70326c6-7e19-0410-871a-916f4a2858ee
  • Loading branch information
Sandro Santilli committed Feb 9, 2012
1 parent 6498c6f commit 5703e75
Show file tree
Hide file tree
Showing 25 changed files with 80 additions and 30 deletions.
1 change: 1 addition & 0 deletions liblwgeom/lwgeom_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
**********************************************************************/

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_log.h"
#include <string.h>
Expand Down
2 changes: 0 additions & 2 deletions libpgcommon/lwgeom_pg.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "utils/geo_decls.h"
#include "fmgr.h"

#include "../postgis_config.h"

#include "liblwgeom.h"
#include "pgsql_compat.h"

Expand Down
1 change: 1 addition & 0 deletions libpgcommon/lwgeom_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "utils/hsearch.h"

/* PostGIS headers */
#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"
#include "lwgeom_transform.h"
Expand Down
1 change: 1 addition & 0 deletions postgis/geography_estimate.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "utils/lsyscache.h"
#include "utils/syscache.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"

Expand Down
1 change: 1 addition & 0 deletions postgis/geometry_estimate.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "utils/lsyscache.h"
#include "utils/syscache.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h" /* For debugging macros. */
#include "gserialized_gist.h" /* For index common functions */
Expand Down
1 change: 1 addition & 0 deletions postgis/long_xact.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "commands/trigger.h" /* ... and triggers */
#include "utils/lsyscache.h" /* for get_namespace_name() */

#include "../postgis_config.h"
#include "lwgeom_pg.h"

#define ABORT_ON_AUTH_FAILURE 1
Expand Down
2 changes: 2 additions & 0 deletions postgis/lwgeom_accum.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include "utils/array.h"
#include "utils/lsyscache.h"

#include "../postgis_config.h"

#include "liblwgeom.h"
#include "lwgeom_pg.h"

Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_box.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "utils/elog.h"
#include "utils/geo_decls.h"

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "liblwgeom_internal.h"
Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_box3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "utils/elog.h"
#include "utils/geo_decls.h"

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "liblwgeom_internal.h"
Expand Down
15 changes: 13 additions & 2 deletions postgis/lwgeom_btree.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/***********************************************************
/**********************************************************************
*
* $Id$
* PostGIS - Spatial Types for PostgreSQL
* http://postgis.refractions.net
*
* Copyright (C) 2010 Olivier Courtin <olivier.courtin@oslandia.com>
* Copyright (C) 2010 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
* Copyright (C) 2009-2011 Paul Ramsey <pramsey@cleverelephant.ca>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU General Public Licence. See the COPYING file.
*
**********************************************************************
*
* Comparision function for use in Binary Tree searches
* (ORDER BY, GROUP BY, DISTINCT)
Expand All @@ -11,6 +21,7 @@
#include "fmgr.h"
#include "utils/geo_decls.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"

Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "postgres.h"
#include "fmgr.h"

#include "../postgis_config.h"
#include "lwgeom_cache.h"

GeomCache* GetGeomCache(FunctionCallInfoData *fcinfo)
Expand Down
18 changes: 9 additions & 9 deletions postgis/lwgeom_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
* the terms of the GNU General Public Licence. See the COPYING file.
*
**********************************************************************/

#include <math.h>
#include <float.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>

#include "postgres.h"
#include "fmgr.h"
#include "utils/elog.h"
#include "utils/array.h"
#include "utils/geo_decls.h"
#include "funcapi.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"

#include "../postgis_config.h"

#include <math.h>
#include <float.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>


Datum LWGEOM_dump(PG_FUNCTION_ARGS);
Datum LWGEOM_dump_rings(PG_FUNCTION_ARGS);
Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "postgres.h"
#include "executor/spi.h"

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "lwgeom_export.h"
Expand Down
5 changes: 4 additions & 1 deletion postgis/lwgeom_functions_lrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
*
**********************************************************************/

#include <math.h>

#include "postgres.h"
#include "fmgr.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"
#include "math.h"

/*
* Add a measure dimension to a line, interpolating linearly from the
Expand Down
5 changes: 4 additions & 1 deletion postgis/lwgeom_in_geojson.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
*
**********************************************************************/

#include <assert.h>

#include "postgres.h"

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include <assert.h>

Datum geom_from_geojson(PG_FUNCTION_ARGS);

Expand Down
14 changes: 7 additions & 7 deletions postgis/lwgeom_in_gml.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
**********************************************************************/


#include "postgres.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "lwgeom_transform.h"
#include "executor/spi.h"


#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>

#include "postgres.h"
#include "executor/spi.h"

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "lwgeom_transform.h"


Datum geom_from_gml(PG_FUNCTION_ARGS);
Expand Down
8 changes: 5 additions & 3 deletions postgis/lwgeom_in_kml.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
**********************************************************************/


#include <libxml/tree.h>
#include <libxml/parser.h>

#include "postgres.h"

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"


#include <libxml/tree.h>
#include <libxml/parser.h>


/*
TODO:
Expand Down
2 changes: 2 additions & 0 deletions postgis/lwgeom_ogc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "fmgr.h"
#include "utils/elog.h"

#include "../postgis_config.h"

#include "liblwgeom.h"
#include "lwgeom_pg.h"

Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_rtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <assert.h>

#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "liblwgeom_internal.h" /* For FP comparators. */
Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_spheroid.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "fmgr.h"
#include "utils/elog.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"

Expand Down
9 changes: 5 additions & 4 deletions postgis/lwgeom_sqlmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
*
**********************************************************************/

#include "postgres.h"
#include "liblwgeom.h"
#include "fmgr.h"

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>

#include "postgres.h"
#include "fmgr.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"


Expand Down
1 change: 1 addition & 0 deletions postgis/lwgeom_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "postgres.h"
#include "fmgr.h"

#include "../postgis_config.h"
#include "liblwgeom.h"
#include "lwgeom_transform.h"

Expand Down
14 changes: 14 additions & 0 deletions postgis/lwgeom_triggers.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
/**********************************************************************
*
* PostGIS - Spatial Types for PostgreSQL
* http://postgis.refractions.net
*
* Copyright (C) 2004 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU General Public Licence. See the COPYING file.
*
**********************************************************************/

#include "postgres.h"
#include "executor/spi.h" /* this is what you need to work with SPI */
#include "commands/trigger.h" /* ... and triggers */

#include "../postgis_config.h"
#include "lwgeom_pg.h"

Datum cache_bbox(PG_FUNCTION_ARGS);
Expand Down
2 changes: 1 addition & 1 deletion postgis/postgis_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include "utils/elog.h"
#include "utils/guc.h"

#include "../postgis_config.h"
#include "lwgeom_log.h"
#include "lwgeom_pg.h"
#include "../postgis_config.h"

/*
* This is required for builds against pgsql
Expand Down
2 changes: 2 additions & 0 deletions raster/rt_pg/rt_pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
#include <executor/executor.h> /* for GetAttributeByName in RASTER_reclass */
#include <funcapi.h>

#include "../../postgis_config.h"

#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "liblwgeom_internal.h" /* for clamp_srid() */
Expand Down

0 comments on commit 5703e75

Please sign in to comment.