[glib/glib-2-48] glib/gnulib/printf-parse.c: Fix build on Visual Studio 2008



commit 1435f13bff6e8dd3cba6f2d95a79e0db7cfb1e1c
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]