*
**********************************************************************/
+/* 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
#include <string.h>
#include <assert.h>
+#if POSTGIS_PROFILE > 0
+#warning POSTGIS_PROFILE enabled!
+#endif
+
+
/*
** Prototypes for SQL-bound functions
*/
#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 <string.h>
-
-#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.
*
**********************************************************************/
+#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 <string.h>
#include <assert.h>
#include <assert.h>
+#include "../postgis_config.h"
#include "lwgeom_geos_prepared.h"
#include "lwgeom_cache.h"
#include "utils/memutils.h"
#include "access/hash.h"
-#include "../postgis_config.h"
-
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "lwgeom_geos.h"
*
**********************************************************************/
+#include "postgres.h"
+#include "fmgr.h"
+#include "funcapi.h"
+
+#include "../postgis_config.h"
#include "lwgeom_geos.h"
+#include "lwgeom_pg.h"
#include <string.h>
#include <assert.h>