[glib/glib-2-54] Build: Fix glib/glibconfig.h.win32.in for x64 builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-54] Build: Fix glib/glibconfig.h.win32.in for x64 builds
- Date: Fri, 15 Sep 2017 05:12:05 +0000 (UTC)
commit 20364bbdf55a7662b657ad50e16c6b121463809b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Sep 15 13:10:34 2017 +0800
Build: Fix glib/glibconfig.h.win32.in for x64 builds
Fix the [GSIZE|GSSIZE]_TO_[BE|LE] macros on x64 builds.
glib/glibconfig.h.win32.in | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in
index 9a91c5e..a8d8c0c 100644
--- a/glib/glibconfig.h.win32.in
+++ b/glib/glibconfig.h.win32.in
@@ -219,10 +219,19 @@ typedef unsigned __int64 guintptr;
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
-#define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val))
-#define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val))
-#define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val))
-#define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val))
+
+#ifdef _WIN64
+# define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
+# define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
+# define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
+# define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
+#else
+# define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val))
+# define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val))
+# define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val))
+# define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val))
+#endif
+
#define G_BYTE_ORDER G_LITTLE_ENDIAN
#define GLIB_SYSDEF_POLLIN =1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]