From 55e436c1d1c8e41e3dd1c1ef347026d7582d8efd Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 8 Aug 2011 09:27:09 +0000 Subject: [PATCH] Move getMachineEndian() and error_if_srid_mismatch() from liblwgeom.h to liblwgeom_internal.h git-svn-id: http://svn.osgeo.org/postgis/trunk@7707 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/liblwgeom.h | 7 ------- liblwgeom/liblwgeom_internal.h | 12 +++++++++++- liblwgeom/lwgeom_geos.c | 1 + postgis/lwgeom_box2dfloat4.c | 1 + postgis/lwgeom_box3d.c | 1 + postgis/lwgeom_functions_analytic.c | 1 + postgis/lwgeom_geos.c | 1 + postgis/lwgeom_geos_clean.c | 1 + postgis/lwgeom_geos_sharedpaths.c | 1 + postgis/lwgeom_geos_snap.c | 1 + postgis/lwgeom_geos_split.c | 1 + postgis/lwgeom_gist.c | 1 + 12 files changed, 21 insertions(+), 8 deletions(-) diff --git a/liblwgeom/liblwgeom.h b/liblwgeom/liblwgeom.h index e61d3109b..afc5a4ce0 100644 --- a/liblwgeom/liblwgeom.h +++ b/liblwgeom/liblwgeom.h @@ -2189,13 +2189,6 @@ extern void lwfree(void *mem); extern void trim_trailing_zeros(char *num); extern char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection); -/* Machine endianness */ -#define XDR 0 -#define NDR 1 -extern char getMachineEndian(void); - -void error_if_srid_mismatch(int srid1, int srid2); - /******************************************************************************* * SQLMM internal functions - TODO: Move into separate header files diff --git a/liblwgeom/liblwgeom_internal.h b/liblwgeom/liblwgeom_internal.h index 088bb9509..7f31a1cf9 100644 --- a/liblwgeom/liblwgeom_internal.h +++ b/liblwgeom/liblwgeom_internal.h @@ -79,6 +79,16 @@ * Internal prototypes */ + +/* Machine endianness */ +#define XDR 0 +#define NDR 1 +extern char getMachineEndian(void); + +/* Raise an lwerror if srids do not match */ +void error_if_srid_mismatch(int srid1, int srid2); + + /* * Force dims */ @@ -211,4 +221,4 @@ void ptarray_affine(POINTARRAY *pa, const AFFINE *affine); char ptarray_isccw(const POINTARRAY *pa); -#endif /* LIBLWGEOM_INTERNAL */ \ No newline at end of file +#endif /* LIBLWGEOM_INTERNAL */ diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c index 3c7afa7e8..d9aae6d89 100644 --- a/liblwgeom/lwgeom_geos.c +++ b/liblwgeom/lwgeom_geos.c @@ -12,6 +12,7 @@ #include "lwgeom_geos.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include "profile.h" #include diff --git a/postgis/lwgeom_box2dfloat4.c b/postgis/lwgeom_box2dfloat4.c index fc05c69b4..9bf53e5a3 100644 --- a/postgis/lwgeom_box2dfloat4.c +++ b/postgis/lwgeom_box2dfloat4.c @@ -7,6 +7,7 @@ #include "lwgeom_pg.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include #include diff --git a/postgis/lwgeom_box3d.c b/postgis/lwgeom_box3d.c index 4dd77316a..893b55b3b 100644 --- a/postgis/lwgeom_box3d.c +++ b/postgis/lwgeom_box3d.c @@ -11,6 +11,7 @@ #include "lwgeom_pg.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include #include diff --git a/postgis/lwgeom_functions_analytic.c b/postgis/lwgeom_functions_analytic.c index 5c521a30c..700c589b0 100644 --- a/postgis/lwgeom_functions_analytic.c +++ b/postgis/lwgeom_functions_analytic.c @@ -13,6 +13,7 @@ #include "postgres.h" #include "fmgr.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include "lwgeom_pg.h" #include "math.h" #include "lwgeom_rtree.h" diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index e95544593..946406869 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -17,6 +17,7 @@ #include "lwgeom_geos_prepared.h" #include "funcapi.h" #include "lwgeom_functions_analytic.h" +#include "liblwgeom_internal.h" #include #include diff --git a/postgis/lwgeom_geos_clean.c b/postgis/lwgeom_geos_clean.c index 1f83ca0dc..22619e19c 100644 --- a/postgis/lwgeom_geos_clean.c +++ b/postgis/lwgeom_geos_clean.c @@ -36,6 +36,7 @@ **********************************************************************/ #include "lwgeom_geos.h" +#include "liblwgeom_internal.h" #include "funcapi.h" #include diff --git a/postgis/lwgeom_geos_sharedpaths.c b/postgis/lwgeom_geos_sharedpaths.c index 60a9f6bec..9214c3dc0 100644 --- a/postgis/lwgeom_geos_sharedpaths.c +++ b/postgis/lwgeom_geos_sharedpaths.c @@ -26,6 +26,7 @@ **********************************************************************/ #include "lwgeom_geos.h" +#include "liblwgeom_internal.h" #include #include diff --git a/postgis/lwgeom_geos_snap.c b/postgis/lwgeom_geos_snap.c index a01b15a51..07a728e8a 100644 --- a/postgis/lwgeom_geos_snap.c +++ b/postgis/lwgeom_geos_snap.c @@ -18,6 +18,7 @@ **********************************************************************/ #include "lwgeom_geos.h" +#include "liblwgeom_internal.h" #include #include diff --git a/postgis/lwgeom_geos_split.c b/postgis/lwgeom_geos_split.c index 67a62feef..8720de54a 100644 --- a/postgis/lwgeom_geos_split.c +++ b/postgis/lwgeom_geos_split.c @@ -37,6 +37,7 @@ **********************************************************************/ #include "lwgeom_geos.h" +#include "liblwgeom_internal.h" #include "funcapi.h" #include diff --git a/postgis/lwgeom_gist.c b/postgis/lwgeom_gist.c index 5e37f75ac..42d653fc9 100644 --- a/postgis/lwgeom_gist.c +++ b/postgis/lwgeom_gist.c @@ -8,6 +8,7 @@ #include "../postgis_config.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include "lwgeom_pg.h" -- 2.50.0