[GRASS-SVN] r38916 - grass/trunk/lib/vector/diglib

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 29 12:33:40 EDT 2009


Author: glynn
Date: 2009-08-29 12:33:39 -0400 (Sat, 29 Aug 2009)
New Revision: 38916

Modified:
   grass/trunk/lib/vector/diglib/port_init.c
Log:
Don't assume that off_t is "long long"


Modified: grass/trunk/lib/vector/diglib/port_init.c
===================================================================
--- grass/trunk/lib/vector/diglib/port_init.c	2009-08-29 16:32:40 UTC (rev 38915)
+++ grass/trunk/lib/vector/diglib/port_init.c	2009-08-29 16:33:39 UTC (rev 38916)
@@ -84,9 +84,7 @@
 
 #define TEST_PATTERN 1.3333
 #ifdef HAVE_LONG_LONG_INT
-#define OFF_T_TEST 0x0102030405060708LL
-#else
-#define OFF_T_TEST 0x01020304
+#define LONG_LONG_TEST 0x0102030405060708LL
 #endif
 #define LONG_TEST 0x01020304
 #define INT_TEST 0x01020304
@@ -214,9 +212,13 @@
      */
 
     if (nat_off_t == 8)
-	u_o = OFF_T_TEST;
+#ifdef HAVE_LONG_LONG_INT
+	u_o = (off_t) LONG_LONG_TEST;
+#else
+	G_fatal_error("Internal error: can't construct an off_t literal");
+#endif
     else
-	u_o = LONG_TEST;
+	u_o = (off_t) LONG_TEST;
 
     dbl_order =
 	find_offsets(&u_d, dbl_cnvrt, dbl_cmpr, PORT_DOUBLE, nat_dbl,



More information about the grass-commit mailing list