[glib] glib/glibconfig.h.win32.in: Update and clean up
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib/glibconfig.h.win32.in: Update and clean up
- Date: Fri, 15 Sep 2017 05:08:32 +0000 (UTC)
commit 4fd056a5f58c17085bb4d09a72c00a00d8e2c1c6
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Sep 15 12:50:50 2017 +0800
glib/glibconfig.h.win32.in: Update and clean up
Make the entries in here more consistent with what Meson produces with
its Visual Studio builds. Also fix the macros [GSIZE|GSSIZE]_TO_[LE|BE]
for x64 builds.
glib/glibconfig.h.win32.in | 126 ++++++++++++++++++++++----------------------
1 files changed, 63 insertions(+), 63 deletions(-)
---
diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in
index 9a91c5e..d16e7c8 100644
--- a/glib/glibconfig.h.win32.in
+++ b/glib/glibconfig.h.win32.in
@@ -15,6 +15,13 @@
#include <limits.h>
#include <float.h>
+/* #undef GLIB_HAVE_ALLOCA_H */
+
+/* Specifies that GLib's g_print*() functions wrap the
+ * system printf functions. This is useful to know, for example,
+ * when using glibc's register_printf_function().
+ */
+#define GLIB_USING_SYSTEM_PRINTF
G_BEGIN_DECLS
@@ -46,24 +53,11 @@ typedef unsigned int guint32;
#define G_GUINT32_FORMAT "u"
#define G_HAVE_GINT64 1 /* deprecated, always true */
-#ifndef _MSC_VER
G_GNUC_EXTENSION typedef signed long long gint64;
G_GNUC_EXTENSION typedef unsigned long long guint64;
-#else /* _MSC_VER */
-typedef signed __int64 gint64;
-typedef unsigned __int64 guint64;
-#endif /* _MSC_VER */
-#ifndef _MSC_VER
#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
-#else /* _MSC_VER */
-#define G_GINT64_CONSTANT(val) (val##i64)
-#endif /* _MSC_VER */
-#ifndef _MSC_VER
#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
-#else /* _MSC_VER */
-#define G_GUINT64_CONSTANT(val) (val##Ui64)
-#endif /* _MSC_VER */
#define G_GINT64_MODIFIER "I64"
#define G_GINT64_FORMAT "I64i"
#define G_GUINT64_FORMAT "I64u"
@@ -79,7 +73,7 @@ typedef unsigned long long gsize;
#define G_GSIZE_MODIFIER "I64"
#define G_GSSIZE_MODIFIER "I64"
#define G_GSIZE_FORMAT "I64u"
-#define G_GSSIZE_FORMAT "I64d"
+#define G_GSSIZE_FORMAT "I64i"
#define G_MAXSIZE G_MAXUINT64
#define G_MINSSIZE G_MININT64
@@ -113,45 +107,35 @@ typedef gint64 goffset;
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
-#ifndef _WIN64
-
-#define G_POLLFD_FORMAT "%#x"
+#ifdef _WIN64
+# define G_POLLFD_FORMAT "%#I64x"
+# define GPOINTER_TO_INT(p) ((gint) (gint64) (p))
+# define GPOINTER_TO_UINT(p) ((guint) (guint64) (p))
-#define GPOINTER_TO_INT(p) ((gint) (p))
-#define GPOINTER_TO_UINT(p) ((guint) (p))
+# define GINT_TO_POINTER(i) ((gpointer) (gint64) (i))
+# define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u))
-#define GINT_TO_POINTER(i) ((gpointer) (i))
-#define GUINT_TO_POINTER(u) ((gpointer) (u))
-
-typedef signed int gintptr;
-typedef unsigned int guintptr;
-
-#define G_GINTPTR_MODIFIER ""
-#define G_GINTPTR_FORMAT "i"
-#define G_GUINTPTR_FORMAT "u"
+typedef signed long long gintptr;
+typedef unsigned long long guintptr;
+# define G_GINTPTR_MODIFIER "I64"
+# define G_GINTPTR_FORMAT "I64i"
+# define G_GUINTPTR_FORMAT "I64u"
#else
+# define G_POLLFD_FORMAT "%#x"
-#define G_POLLFD_FORMAT "%#I64x"
+# define GPOINTER_TO_INT(p) ((gint) (gint) (p))
+# define GPOINTER_TO_UINT(p) ((guint) (guint) (p))
-#define GPOINTER_TO_INT(p) ((gint) (gint64) (p))
-#define GPOINTER_TO_UINT(p) ((guint) (guint64) (p))
+# define GINT_TO_POINTER(i) ((gpointer) (gint) (i))
+# define GUINT_TO_POINTER(u) ((gpointer) (guint) (u))
-#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;
-#else
-typedef signed __int64 gintptr;
-typedef unsigned __int64 guintptr;
-#endif
-
-#define G_GINTPTR_MODIFIER "I64"
-#define G_GINTPTR_FORMAT "I64i"
-#define G_GUINTPTR_FORMAT "I64u"
+typedef signed int gintptr;
+typedef unsigned int guintptr;
+# define G_GINTPTR_MODIFIER ""
+# define G_GINTPTR_FORMAT "i"
+# define G_GUINTPTR_FORMAT "u"
#endif
#ifndef G_DISABLE_DEPRECATED
@@ -173,7 +157,9 @@ typedef unsigned __int64 guintptr;
#endif /* not _MSC_VER or 2013 or later */
#ifndef _MSC_VER
-#define G_HAVE_ISO_VARARGS 1
+# define G_HAVE_ISO_VARARGS 1
+# define G_HAVE_GNUC_VARARGS 1
+# define G_HAVE_GNUC_VISIBILITY 1
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
* is passed ISO vararg support is turned off, and there is no work
@@ -183,16 +169,21 @@ typedef unsigned __int64 guintptr;
# undef G_HAVE_ISO_VARARGS
#endif
-#define G_HAVE_GNUC_VARARGS 1
+#define G_HAVE_GROWING_STACK 0
+
#else /* _MSC_VER */
-/* varargs macros available since msvc8 (vs2005) */
-# if _MSC_VER >= 1400
-# define G_HAVE_ISO_VARARGS 1
-# endif
+# define G_HAVE_ISO_VARARGS 1
#endif /* not _MSC_VER */
-#define G_HAVE_GROWING_STACK 0
-#define G_GNUC_INTERNAL
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+# define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define G_GNUC_INTERNAL __hidden
+#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
+# define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#else
+# define G_GNUC_INTERNAL
+#endif
#define G_THREADS_ENABLED
#define G_THREADS_IMPL_WIN32
@@ -219,18 +210,27 @@ 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
-#define GLIB_SYSDEF_POLLOUT =4
-#define GLIB_SYSDEF_POLLPRI =2
-#define GLIB_SYSDEF_POLLHUP =16
-#define GLIB_SYSDEF_POLLERR =8
-#define GLIB_SYSDEF_POLLNVAL =32
+#define GLIB_SYSDEF_POLLIN =768
+#define GLIB_SYSDEF_POLLOUT =16
+#define GLIB_SYSDEF_POLLPRI =1024
+#define GLIB_SYSDEF_POLLHUP =2
+#define GLIB_SYSDEF_POLLERR =1
+#define GLIB_SYSDEF_POLLNVAL =4
#define G_MODULE_SUFFIX "dll"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]