[perl-Glib] Use the correct 64bit integer sprintf formats on MinGW+msvcrt



commit c97c80369440d7ecbbd48f29a53425b254655442
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Thu Jun 18 20:48:45 2009 +0200

    Use the correct 64bit integer sprintf formats on MinGW+msvcrt
    
    MinGW's gcc may link against the msvcrt in which case we need to use the %I64
    format prefix.
    
    Reported by Ari Jolma.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=585215

 GType.xs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/GType.xs b/GType.xs
index e293483..5bd9f1e 100644
--- a/GType.xs
+++ b/GType.xs
@@ -784,7 +784,7 @@ C<SvIV> instead.
 #endif
 
 #ifdef WIN32
-# ifdef _MSC_VER
+# if defined(_MSC_VER) || defined(__MSVCRT__)
 #   define PORTABLE_LL_FORMAT "%I64d"
 # else
 #  define PORTABLE_LL_FORMAT "%ld"
@@ -855,7 +855,7 @@ uses C<SvUV> instead.
 #endif
 
 #ifdef WIN32
-# ifdef _MSC_VER
+# if defined(_MSC_VER) || defined(__MSVCRT__)
 #  define PORTABLE_ULL_FORMAT "%I64u"
 # else
 #  define PORTABLE_ULL_FORMAT "%lu"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]