diff --git a/common/include/common/debug.h b/common/include/common/debug.h index df044c4a..ec650d7e 100644 --- a/common/include/common/debug.h +++ b/common/include/common/debug.h @@ -53,7 +53,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA sizeof(s) > 20 && (s)[sizeof(s)-21] == DIRECTORY_SEPARATOR ? (s) + sizeof(s) - 20 : \ sizeof(s) > 21 && (s)[sizeof(s)-22] == DIRECTORY_SEPARATOR ? (s) + sizeof(s) - 21 : (s)) -#define DEBUG_PRINT(type, fmt, ...) do {fprintf(stderr, "%" PRId64 " " type " %20s:%-4u | %-30s | " fmt "\n", microtime(), STRIPPATH(__FILE__), __LINE__, __FUNCTION__, ##__VA_ARGS__);} while (0) +#define DEBUG_PRINT(type, fmt, ...) do {fprintf(stderr, "%12" PRId64 " " type " %20s:%-4u | %-30s | " fmt "\n", microtime(), STRIPPATH(__FILE__), __LINE__, __FUNCTION__, ##__VA_ARGS__);} while (0) #define DEBUG_BREAK() DEBUG_PRINT("[ ]", "%s", "================================================================================") #define DEBUG_INFO(fmt, ...) DEBUG_PRINT("[I]", fmt, ##__VA_ARGS__) diff --git a/common/src/platform/windows/windebug.c b/common/src/platform/windows/windebug.c index 0bbdcb36..a24f646f 100644 --- a/common/src/platform/windows/windebug.c +++ b/common/src/platform/windows/windebug.c @@ -37,7 +37,7 @@ void DebugWinError(const char * file, const unsigned int line, const char * func if (buffer[i] == '\n' || buffer[i] == '\r') buffer[i] = 0; - fprintf(stderr, "[E] %20s:%-4u | %-30s | %s: 0x%08x (%s)\n", file, line, function, desc, (int)status, buffer); + fprintf(stderr, "%12" PRId64 " [E] %20s:%-4u | %-30s | %s: 0x%08x (%s)\n", microtime(), file, line, function, desc, (int)status, buffer); LocalFree(buffer); } @@ -63,4 +63,4 @@ bool IsWindows8() return (CompareWindowsVersion(6, 3) == TRUE) || (CompareWindowsVersion(6, 2) == TRUE); -} \ No newline at end of file +}