[pypy-svn] r69026 - pypy/branch/msvc-asmgcroot/pypy/translator/c/src

afa at codespeak.net afa at codespeak.net
Fri Nov 6 10:29:20 CET 2009


Author: afa
Date: Fri Nov  6 10:29:20 2009
New Revision: 69026

Modified:
   pypy/branch/msvc-asmgcroot/pypy/translator/c/src/debug.h
Log:
Fix a crash in mingw32 builds, when logs are used


Modified: pypy/branch/msvc-asmgcroot/pypy/translator/c/src/debug.h
==============================================================================
--- pypy/branch/msvc-asmgcroot/pypy/translator/c/src/debug.h	(original)
+++ pypy/branch/msvc-asmgcroot/pypy/translator/c/src/debug.h	Fri Nov  6 10:29:20 2009
@@ -125,12 +125,18 @@
   return 1;
 }
 
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#define PYPY_LONG_LONG_PRINTF_FORMAT "I64"
+#else
+#define PYPY_LONG_LONG_PRINTF_FORMAT "ll"
+#endif
+
 static void display_startstop(const char *prefix, const char *postfix,
                               const char *category, const char *colors)
 {
   long long timestamp;
   READ_TIMESTAMP(timestamp);
-  fprintf(pypy_debug_file, "%s[%llx] %s%s%s\n%s",
+  fprintf(pypy_debug_file, "%s[%"PYPY_LONG_LONG_PRINTF_FORMAT"x] %s%s%s\n%s",
           colors,
           timestamp, prefix, category, postfix,
           debug_stop_colors);



More information about the Pypy-commit mailing list