[glib] glib/gnulib/printf-parse.c: Fix build on Visual Studio 2008
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib/gnulib/printf-parse.c: Fix build on Visual Studio 2008
- Date: Wed, 25 May 2016 06:17:30 +0000 (UTC)
commit 6bd94863d0228465731c827e66f1bf9050f351a6
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed May 25 14:13:33 2016 +0800
glib/gnulib/printf-parse.c: Fix build on Visual Studio 2008
Visual Studio 2008 does not come with stdint.h, so define intmax_t instead
on Visual Studio 2008 so that the code will continue to build. This was
previously unnoticed as building GTK+ since 3.16 requires an
implementation of stdint.h (such as msinttypes), and it took care of the
need of including the stdint.h header here, but people could be very well
using GLib without using GTK+ 3.x.
glib/gnulib/printf-parse.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/glib/gnulib/printf-parse.c b/glib/gnulib/printf-parse.c
index 83629d2..30828a8 100644
--- a/glib/gnulib/printf-parse.c
+++ b/glib/gnulib/printf-parse.c
@@ -60,7 +60,11 @@
# include <inttypes.h>
# endif
#else
-# include <stdint.h>
+# if !defined (_MSC_VER) || (_MSC_VER >= 1600)
+# include <stdint.h>
+# else
+typedef signed __int64 intmax_t;
+# endif
#endif
/* malloc(), realloc(), free(). */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]