[GRASS-SVN] r52036 - grass/trunk/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 11 20:57:14 PDT 2012
Author: glynn
Date: 2012-06-11 20:57:14 -0700 (Mon, 11 Jun 2012)
New Revision: 52036
Modified:
grass/trunk/lib/raster/xdr.c
Log:
Fix XDR functions for big-endian platforms
Modified: grass/trunk/lib/raster/xdr.c
===================================================================
--- grass/trunk/lib/raster/xdr.c 2012-06-11 12:22:51 UTC (rev 52035)
+++ grass/trunk/lib/raster/xdr.c 2012-06-12 03:57:14 UTC (rev 52036)
@@ -1,4 +1,5 @@
+#include <stdlib.h>
#include <grass/raster.h>
#include "R.h"
@@ -13,7 +14,7 @@
dst[3] = src[0];
}
else
- *dst = *src;
+ memcpy(dst, src, 4);
}
static void swap_double(void *dstp, const void *srcp) {
@@ -30,7 +31,7 @@
dst[7] = src[0];
}
else
- *dst = *src;
+ memcpy(dst, src, 8);
}
void Rast_xdr_get_float(float *dst, const void *src)
More information about the grass-commit
mailing list