From: Tor Lillqvist Date: Sat, 2 Aug 2008 11:21:14 +0000 (+0000) Subject: Add 64-bit versions of GPOINTER_TO_INT(), GPOINTER_TO_UINT() and vice X-Git-Tag: GLIB_2_17_5~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4194cb055e44f8a1bd2ab666ead9fa040bcdb89;p=platform%2Fupstream%2Fglib.git Add 64-bit versions of GPOINTER_TO_INT(), GPOINTER_TO_UINT() and vice 2008-08-02 Tor Lillqvist * glibconfig.h.win32.in: Add 64-bit versions of GPOINTER_TO_INT(), GPOINTER_TO_UINT() and vice versa, too. svn path=/trunk/; revision=7288 --- diff --git a/ChangeLog b/ChangeLog index a6d73a8..30261c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,10 @@ 2008-08-02 Tor Lillqvist * glibconfig.h.win32.in: Add gintptr and guintptr typedefs here, - too, appropriately ifdeffed for 32/64 bit, gcc/MSVC. - + too, appropriately ifdeffed for 32/64 bit, gcc/MSVC. Add 64-bit + versions of GPOINTER_TO_INT(), GPOINTER_TO_UINT() and vice versa, + too. + 2008-08-01 Matthias Clasen * NEWS: Updates diff --git a/glibconfig.h.win32.in b/glibconfig.h.win32.in index 91ae235..1a422c7 100644 --- a/glibconfig.h.win32.in +++ b/glibconfig.h.win32.in @@ -102,6 +102,7 @@ typedef gint64 goffset; #define G_MINOFFSET G_MININT64 #define G_MAXOFFSET G_MAXINT64 +#ifndef _WIN64 #define GPOINTER_TO_INT(p) ((gint) (p)) #define GPOINTER_TO_UINT(p) ((guint) (p)) @@ -109,10 +110,17 @@ typedef gint64 goffset; #define GINT_TO_POINTER(i) ((gpointer) (i)) #define GUINT_TO_POINTER(u) ((gpointer) (u)) -#ifndef _WIN64 typedef signed int gintptr; typedef unsigned int guintptr; + #else + +#define GPOINTER_TO_INT(p) ((gint) (gint64) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (guint64) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (gint64) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u)) + #ifndef _MSC_VER typedef signed long long gintptr; typedef unsigned long long guintptr; @@ -120,6 +128,7 @@ typedef unsigned long long guintptr; typedef signed __int64 gintptr; typedef unsigned __int64 guintptr; #endif + #endif #ifdef NeXT /* @#%@! NeXTStep */