[PATCH] use G_GINT64_MODIFIER for IDL_LL in IDL.h.in



The m4 hack to determine a passable print/scanf() modifier was producing
warnings when its results were used to compile libIDL for an amd64 target with
GCC 4.3.4. This changeset removes the test from configure.in.

The relevant define had been present since glib 2.4.0, which configure.in
already depends on.

Signed-off-by: Kalle A. Sandstrom <ksandstr iki fi>
---
 configure.in            |   28 ----------------------------
 include/libIDL/IDL.h.in |    2 +-
 2 files changed, 1 insertions(+), 29 deletions(-)

diff --git a/configure.in b/configure.in
index 250b821..1c7f2d2 100644
--- a/configure.in
+++ b/configure.in
@@ -111,34 +111,6 @@ dnl glib requires a 64-bit type
 dnl to support MSVC add __int64
 AC_CHECK_SIZEOF(long long)
 
-AC_MSG_CHECKING(for format to printf and scanf a guint64)
-AC_CACHE_VAL(libIDL_cv_long_long_format,[
-    for format in ll q I64; do
-	AC_TRY_RUN([#include <stdio.h>
-	    #include <stdlib.h>  
-	    int main()
-	    {
-		long long b, a = -0x3AFAFAFAFAFAFAFALL;
-		char buffer[1000];
-		sprintf (buffer, "%${format}u", a);
-  		sscanf (buffer, "%${format}u", &b);
-		exit (b!=a);
-	    }
-	    ],
-	    libIDL_cv_long_long_format=${format}
-	    break)
-	done])
-if test -n "$libIDL_cv_long_long_format"; then
-    AC_MSG_RESULT(%${libIDL_cv_long_long_format}u)
-    IDL_LL="\"${libIDL_cv_long_long_format}\""
-    AC_SUBST(IDL_LL)
-else
-    AC_MSG_RESULT(none)
-    AC_MSG_ERROR([
-*** libIDL requires a 64 bit format type.
-])
-fi
-
 
 if test "x$GCC" = "xyes" -a "x$enable_compile_warnings" != "xno"; then
         WARN_CFLAGS="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations"
diff --git a/include/libIDL/IDL.h.in b/include/libIDL/IDL.h.in
index 3c6ad42..7a41e1b 100644
--- a/include/libIDL/IDL.h.in
+++ b/include/libIDL/IDL.h.in
@@ -106,7 +106,7 @@ extern "C" {
 			    G_STRFUNC)->u.name)
 
 /* GLib 2.0 requires 64-bit types */
-#define IDL_LL		@IDL_LL@
+#define IDL_LL		G_GINT64_MODIFIER
 typedef gint64		IDL_longlong_t;
 typedef guint64		IDL_ulonglong_t;
 
-- 
1.6.5.2



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]