[postgis-commits] svn - r2998 - trunk/liblwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Sep 23 14:32:19 PDT 2008


Author: mcayland
Date: 2008-09-23 14:32:19 -0700 (Tue, 23 Sep 2008)
New Revision: 2998

Modified:
   trunk/liblwgeom/vsprintf.c
Log:
Use __va_copy() to pass a copy of the variadic structure to lw_vasprintf() to solve ABI difference between 32bit/64bit architectures.


Modified: trunk/liblwgeom/vsprintf.c
===================================================================
--- trunk/liblwgeom/vsprintf.c	2008-09-23 19:59:36 UTC (rev 2997)
+++ trunk/liblwgeom/vsprintf.c	2008-09-23 21:32:19 UTC (rev 2998)
@@ -144,7 +144,12 @@
      const char *format;
      va_list args;
 {
-  return int_vasprintf (result, format, args);
+  va_list temp;
+
+  /* Use va_copy for compatibility with both 32 and 64 bit args */
+  __va_copy(temp, args);
+
+  return int_vasprintf (result, format, &temp);
 }
 
 int



More information about the postgis-commits mailing list