Re: working version of GTK for win64



Oleg Tchij wrote:
I've tried to build and run gtk for 64-bit Windows. At last I can upload working version for usage:

Nice, good to see!

 2) use the following main types definitions:

#define GLIB_SIZEOF_LONG   4
#define GLIB_SIZEOF_SIZE_T 8

I have been doing some 64-bit building as well, and used the attached patch for the sizes/types.

/Richard

--
Imendio AB - Expert solutions in GTK+
http://www.imendio.com
diff --git a/glib-2.14.6/glibconfig.h.win32 b/glib-2.14.6/glibconfig.h.win32
index 62eda5f..093eaed 100644
--- a/glib-2.14.6/glibconfig.h.win32
+++ b/glib-2.14.6/glibconfig.h.win32
@@ -64,6 +64,24 @@ typedef unsigned __int64 guint64;
 #define G_GINT64_FORMAT "I64i"
 #define G_GUINT64_FORMAT "I64u"
 
+#if defined(_M_X64) || defined(_M_AMD64)
+
+#define GLIB_SIZEOF_VOID_P 8
+#define GLIB_SIZEOF_LONG   4
+#define GLIB_SIZEOF_SIZE_T 8
+
+typedef signed long long gssize;
+typedef unsigned long long gsize;
+#define G_GSIZE_MODIFIER "I64"
+#define G_GSSIZE_FORMAT "I64d"
+#define G_GSIZE_FORMAT "I64u"
+
+#define G_MAXSIZE	G_MAXUINT64
+#define G_MINSSIZE	G_MININT64
+#define G_MAXSSIZE	G_MAXINT64
+
+#else
+
 #define GLIB_SIZEOF_VOID_P 4
 #define GLIB_SIZEOF_LONG   4
 #define GLIB_SIZEOF_SIZE_T 4
@@ -78,6 +96,8 @@ typedef unsigned int gsize;
 #define G_MINSSIZE	G_MININT
 #define G_MAXSSIZE	G_MAXINT
 
+#endif
+
 typedef gint64 goffset;
 #define G_MINOFFSET	G_MININT64
 #define G_MAXOFFSET	G_MAXINT64


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