]> granicus.if.org Git - postgis/commitdiff
Fix error of unknown symbol gidx_to_string when building with the flags --with-raster...
authorBborie Park <bkpark at ucdavis.edu>
Thu, 25 Aug 2011 18:18:20 +0000 (18:18 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Thu, 25 Aug 2011 18:18:20 +0000 (18:18 +0000)
Associated ticket is #1161

git-svn-id: http://svn.osgeo.org/postgis/trunk@7786 b70326c6-7e19-0410-871a-916f4a2858ee

libpgcommon/gserialized_gist.c
libpgcommon/gserialized_gist.h
postgis/gserialized_gist_nd.c

index 6ff3a81e5751c778bc29f2de05b2a53a56dec4f7..d28643a4740faf699c0a34f865623c962a60abca 100644 (file)
 #include "gserialized_gist.h"
 
 
+/* Generate human readable form for GIDX. */
+#if POSTGIS_DEBUG_LEVEL > 0
+char* gidx_to_string(GIDX *a)
+{
+       char *str, *rv;
+       int i, ndims;
+
+       if ( a == NULL )
+               return pstrdup("<NULLPTR>");
+
+       str = (char*)palloc(128);
+       rv = str;
+       ndims = GIDX_NDIMS(a);
+
+       str += sprintf(str, "GIDX(");
+       for ( i = 0; i < ndims; i++ )
+               str += sprintf(str, " %.12g", GIDX_GET_MIN(a,i));
+       str += sprintf(str, ",");
+       for ( i = 0; i < ndims; i++ )
+               str += sprintf(str, " %.12g", GIDX_GET_MAX(a,i));
+       str += sprintf(str, " )");
+
+       return rv;
+}
+#endif
+
 
 /**
 * Given a #GSERIALIZED datum, as quickly as possible (peaking into the top
index 2c12bd651d31287f32f5e6a14ccfe438f2323926..72b73d3237d4b830b7b4d5703aba59126e50dedf 100644 (file)
@@ -58,6 +58,13 @@ GIDX* gidx_from_gbox(GBOX box);
 /* Increase the size of a GIDX */
 void gidx_expand(GIDX *a, float d);
 
+
+/* Generate human readable form for GIDX. */
+#if POSTGIS_DEBUG_LEVEL > 0
+char* gidx_to_string(GIDX *a) ; 
+#endif
+
+
 /* Returns number of dimensions for this GIDX */
 #define GIDX_NDIMS(gidx) ((VARSIZE((gidx)) - VARHDRSZ) / (2 * sizeof(float)))
 /* Minimum accessor. */
index 6e5929b6457d834ac87220f9fc5cd9047019ae2c..55cebb2d562c06822f350baa13ef75c4b0ccaf7e 100644 (file)
@@ -78,32 +78,6 @@ Datum gserialized_within(PG_FUNCTION_ARGS);
 typedef bool (*gidx_predicate)(GIDX *a, GIDX *b);
 
 
-/* Generate human readable form for GIDX. */
-#if POSTGIS_DEBUG_LEVEL > 0
-static char* gidx_to_string(GIDX *a)
-{
-       char *str, *rv;
-       int i, ndims;
-
-       if ( a == NULL )
-               return pstrdup("<NULLPTR>");
-
-       str = (char*)palloc(128);
-       rv = str;
-       ndims = GIDX_NDIMS(a);
-
-       str += sprintf(str, "GIDX(");
-       for ( i = 0; i < ndims; i++ )
-               str += sprintf(str, " %.12g", GIDX_GET_MIN(a,i));
-       str += sprintf(str, ",");
-       for ( i = 0; i < ndims; i++ )
-               str += sprintf(str, " %.12g", GIDX_GET_MAX(a,i));
-       str += sprintf(str, " )");
-
-       return rv;
-}
-#endif
-
 /* Allocate a new copy of GIDX */
 static GIDX* gidx_copy(GIDX *b)
 {