memory alignment (solaris issue).
git-svn-id: http://svn.osgeo.org/postgis/trunk@423
b70326c6-7e19-0410-871a-
916f4a2858ee
*
**********************************************************************
* $Log$
+ * Revision 1.36 2004/01/13 22:14:25 pramsey
+ * Changed getint and getdouble used by WKB so that it plays nice with
+ * memory alignment (solaris issue).
+ *
* Revision 1.35 2003/12/12 18:00:15 strk
* reverted make_line patch, patched size_subobject instead - the reported bug was caused to their inconsistency
*
int getint(char *c)
{
- return *((int*)c);
+ int i;
+ memcpy( &i, c, 4);
+ return i;
+//return *((int*)c);
}
double getdouble(char *c)
{
- return *((double*)c);
+ double d;
+ memcpy( &d, c, 8);
+ return d;
+// return *((double*)c);
}
//void flip_endian_double(char *dd);