Michael Stefaniuc : debug.h, test.h: Temporary add ifdefs around some printfs to avoid format.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Sep 29 09:46:08 CDT 2006


Module: wine
Branch: master
Commit: 705b5a00c528b576fdead8047e3e956306879b26
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=705b5a00c528b576fdead8047e3e956306879b26

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Fri Sep 29 01:18:51 2006 +0200

debug.h, test.h: Temporary add ifdefs around some printfs to avoid format.

---

 include/wine/debug.h |   13 +++++++++++++
 include/wine/test.h  |    4 ++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/wine/debug.h b/include/wine/debug.h
index 18de451..152956d 100644
--- a/include/wine/debug.h
+++ b/include/wine/debug.h
@@ -196,19 +196,32 @@ static inline const char *wine_dbgstr_gu
 static inline const char *wine_dbgstr_point( const POINT *pt )
 {
     if (!pt) return "(null)";
+#if defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64)
     return wine_dbg_sprintf( "(%ld,%ld)", pt->x, pt->y );
+#else
+    return wine_dbg_sprintf( "(%d,%d)", pt->x, pt->y );
+#endif
 }
 
 static inline const char *wine_dbgstr_size( const SIZE *size )
 {
     if (!size) return "(null)";
+#if defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64)
     return wine_dbg_sprintf( "(%ld,%ld)", size->cx, size->cy );
+#else
+    return wine_dbg_sprintf( "(%d,%d)", size->cx, size->cy );
+#endif
 }
 
 static inline const char *wine_dbgstr_rect( const RECT *rect )
 {
     if (!rect) return "(null)";
+#if defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64)
     return wine_dbg_sprintf( "(%ld,%ld)-(%ld,%ld)", rect->left, rect->top, rect->right, rect->bottom );
+#else
+    return wine_dbg_sprintf( "(%d,%d)-(%d,%d)", rect->left, rect->top,
+                             rect->right, rect->bottom );
+#endif
 }
 
 static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
diff --git a/include/wine/test.h b/include/wine/test.h
index 8e2bc62..8ef8a31 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -371,7 +371,11 @@ static int run_test( const char *name )
 
     if (winetest_debug)
     {
+#if defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64)
         fprintf( stdout, "%s: %ld tests executed, %ld marked as todo, %ld %s.\n",
+#else
+        fprintf( stdout, "%s: %d tests executed, %d marked as todo, %d %s.\n",
+#endif
                  name, successes + failures + todo_successes + todo_failures,
                  todo_successes, failures + todo_failures,
                  (failures + todo_failures != 1) ? "failures" : "failure" );




More information about the wine-cvs mailing list