Index: IDL.h.new.in
===================================================================
RCS file: /cvs/gnome/libIDL/IDL.h.new.in,v
retrieving revision 1.29
diff -u -r1.29 IDL.h.new.in
--- IDL.h.new.in	24 Sep 2001 16:29:02 -0000	1.29
+++ IDL.h.new.in	1 May 2002 05:34:29 -0000
@@ -103,20 +103,10 @@
 			    __FILE__, __LINE__,			\
 			    G_GNUC_PRETTY_FUNCTION)->u.name)
 
-#ifdef G_HAVE_GINT64
-#  if G_MAXLONG > 0xffffffffUL
-#    define IDL_LL			"l"
-#  else
-#    define IDL_LL			"ll"
-#  endif
-typedef gint64				IDL_longlong_t;
-typedef guint64				IDL_ulonglong_t;
-#else
-#  define IDL_LL			"l"
-typedef long				IDL_longlong_t;
-typedef unsigned long			IDL_ulonglong_t;
-#  warning 64-bit integer type not available, using 32-bit instead
-#endif /* G_HAVE_GINT64 */
+/* GLib 2.0 requires 64-bit types */
+#define IDL_LL		@IDL_LL@
+typedef gint64		IDL_longlong_t;
+typedef guint64		IDL_ulonglong_t;
 
 typedef unsigned int			IDL_declspec_t;
 typedef struct _IDL_tree_node 		IDL_tree_node;
Index: configure.in
===================================================================
RCS file: /cvs/gnome/libIDL/configure.in,v
retrieving revision 1.65
diff -u -r1.65 configure.in
--- configure.in	4 Feb 2002 15:20:17 -0000	1.65
+++ configure.in	1 May 2002 05:34:29 -0000
@@ -81,6 +81,38 @@
 AC_SUBST(HAVE_WCHAR_H)
 AC_SUBST(HAVE_WCSTR_H)
 
+dnl glib requires a 64-bit type
+dnl to support win32 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>  
+	    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"
 else
