[GRASS-SVN] r51032 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 11 08:54:52 EDT 2012


Author: martinl
Date: 2012-03-11 05:54:52 -0700 (Sun, 11 Mar 2012)
New Revision: 51032

Modified:
   grass/trunk/lib/vector/Vlib/open_pg.c
   grass/trunk/lib/vector/Vlib/write_pg.c
Log:
vlib(pg): fix compilation issue (no-gdal)


Modified: grass/trunk/lib/vector/Vlib/open_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open_pg.c	2012-03-11 12:08:51 UTC (rev 51031)
+++ grass/trunk/lib/vector/Vlib/open_pg.c	2012-03-11 12:54:52 UTC (rev 51032)
@@ -14,6 +14,7 @@
  */
 
 #include <string.h>
+#include <stdlib.h>
 
 #include <grass/vector.h>
 #include <grass/dbmi.h>

Modified: grass/trunk/lib/vector/Vlib/write_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write_pg.c	2012-03-11 12:08:51 UTC (rev 51031)
+++ grass/trunk/lib/vector/Vlib/write_pg.c	2012-03-11 12:54:52 UTC (rev 51032)
@@ -21,6 +21,8 @@
    \author Martin Landa <landa.martin gmail.com>
  */
 
+#include <string.h>
+
 #include <grass/vector.h>
 #include <grass/glocale.h>
 
@@ -466,7 +468,7 @@
     if (byte_order == ENDIAN_BIG) {
         int ncount;
 	
-        ncount = CPL_SWAP32(nrings);
+        ncount = SWAP32(nrings);
         memcpy(wkb_data + 5, &ncount, 4);
     }
     else {
@@ -492,9 +494,8 @@
         memcpy(wkb_data+5, &npoints, 4);
 
 	nitems = (with_z ? 3 : 2) * points->n_points;
-        for(i = 0; i < nitems; i++ )
-        {
-            CPL_SWAPDOUBLE(wkb_data + 9 + 4 + 8 * i);
+        for(i = 0; i < nitems; i++ ) {
+            SWAPDOUBLE(wkb_data + 9 + 4 + 8 * i);
         }
     }
 



More information about the grass-commit mailing list