Blob Blame History Raw
diff -ur cpl-4.0/libcext/configure cpl-4.0.new/libcext/configure
--- cpl-4.0/libcext/configure	2007-09-11 15:04:10.000000000 +0200
+++ cpl-4.0.new/libcext/configure	2008-02-09 17:40:32.000000000 +0100
@@ -27487,13 +27487,16 @@
 _CEXTEOF
                         fi
 
-                        if test -n "$cxint64"; then
                             cat >> $tcfgfile << _CEXTEOF
-
-CX_GNUC_EXTENSION typedef signed $cxint64 cxint64;
-CX_GNUC_EXTENSION typedef unsigned $cxint64 cxuint64;
+#include <bits/wordsize.h>
+#if __WORDSIZE == 32
+#include "cxtypes-32.h"
+#elif __WORDSIZE == 64
+#include "cxtypes-64.h"
+#else
+#error "Unknown word size"
+#endif
 _CEXTEOF
-                        fi
 
                         echo "" >> $tcfgfile
 
@@ -27504,13 +27507,17 @@
                             ;;
 
                         x4)
-                            echo "typedef cxint32 cxssize;" >> $tcfgfile
-                            echo "typedef cxuint32 cxsize;" >> $tcfgfile
+     echo "CX_GNUC_EXTENSION typedef signed $cxint64 cxint64;" > ${cfgfile/.h.in/-32.h} 
+     echo "CX_GNUC_EXTENSION typedef unsigned $cxint64 cxuint64;" >> ${cfgfile/.h.in/-32.h}
+         echo "typedef cxint32 cxssize;" >>  ${cfgfile/.h.in/-32.h}
+         echo "typedef cxuint32 cxsize;" >>  ${cfgfile/.h.in/-32.h}
                             ;;
 
                         x8)
-                            echo "typedef cxint64 cxssize;" >> $tcfgfile
-                            echo "typedef cxuint64 cxsize;" >> $tcfgfile
+     echo "CX_GNUC_EXTENSION typedef signed $cxint64 cxint64;" > ${cfgfile/.h.in/-64.h} 
+     echo "CX_GNUC_EXTENSION typedef unsigned $cxint64 cxuint64;" >> ${cfgfile/.h.in/-64.h}
+                            echo "typedef cxint64 cxssize;" >> ${cfgfile/.h.in/-64.h}
+                            echo "typedef cxuint64 cxsize;" >>  ${cfgfile/.h.in/-64.h}
                             ;;
                         *)
                             echo "#error size of size_t is unknown" >> \