Skip to content

Commit

Permalink
fix for bug #1025: It should be no longer necessary to use the I64x f…
Browse files Browse the repository at this point in the history
…ormat 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
  • Loading branch information
ulflulfl committed Aug 12, 2006
1 parent d0aed5f commit 5b4a4a7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config.h.win32
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,23 @@
#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 */
#endif /* PRIx64 */

#ifndef PRIX64
#ifdef _MSC_EXTENSIONS
#define PRIX64 "I64X"
/*#define PRIX64 "I64X"*/
#define PRIX64 "llX"
#else /* _MSC_EXTENSIONS */
#define PRIX64 "llX"
#endif /* _MSC_EXTENSIONS */
Expand Down

0 comments on commit 5b4a4a7

Please sign in to comment.