From 5b4a4a7ea3195aea0a5a045d831ff22ed097ed10 Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Sat, 12 Aug 2006 21:06:24 +0000 Subject: [PATCH] fix for bug #1025: It should be no longer necessary to use the I64x format string for Win32, simply use the llx format string as for the Unix variants, which should be safe as we only use GLib's g_snprintf() function instead of the MSVC one's from snprintf.h The real cause of this: There's a bug in GLib's snprintf implementation which crashes with the I64x format string and certain (negative?) values. svn path=/trunk/; revision=18883 --- config.h.win32 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config.h.win32 b/config.h.win32 index a2e8aac0b85..f4f2e8a0d74 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -167,9 +167,14 @@ #endif /* PRIu64 */ /* Formats for printing 64-bit unsigned hexadecimal numbers */ +/* XXX - it seems that GLib has problems with the MSVC like I64x. + As we use GLib's g_sprintf and alike, it should be safe to use + llx everywhere now, making the macros pretty useless. For details see: + http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1025 */ #ifndef PRIx64 #ifdef _MSC_EXTENSIONS -#define PRIx64 "I64x" +/*#define PRIx64 "I64x"*/ +#define PRIx64 "llx" #else /* _MSC_EXTENSIONS */ #define PRIx64 "llx" #endif /* _MSC_EXTENSIONS */ @@ -177,7 +182,8 @@ #ifndef PRIX64 #ifdef _MSC_EXTENSIONS -#define PRIX64 "I64X" +/*#define PRIX64 "I64X"*/ +#define PRIX64 "llX" #else /* _MSC_EXTENSIONS */ #define PRIX64 "llX" #endif /* _MSC_EXTENSIONS */