summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/windbug.h
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2012-01-14 09:40:49 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2012-01-14 09:40:49 +0000
commite9123cd60fe2b62d1d3e825e4039b0234c51a58f (patch)
tree939ed3fc8d305d47a5b5c157882eaa79e74ee1f6 /otherlibs/win32unix/windbug.h
parentfaa64b30537855022cd62883ac945404fe4d0ffc (diff)
PR#5327, PR#5329: improvements in Unix.select emulation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12023 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/windbug.h')
-rw-r--r--otherlibs/win32unix/windbug.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/otherlibs/win32unix/windbug.h b/otherlibs/win32unix/windbug.h
index 3e2341361..efaeffc01 100644
--- a/otherlibs/win32unix/windbug.h
+++ b/otherlibs/win32unix/windbug.h
@@ -18,13 +18,15 @@
#include <stdio.h>
#include <windows.h>
+/* According to MSDN, MSVC supports the gcc ## operator (to deal with empty argument lists)
+ */
#define DEBUG_PRINT(fmt, ...) \
do \
{ \
if (debug_test()) \
{ \
- fprintf(stderr, "DBUG (pid:%d, tid: %d): ", GetCurrentProcessId(), GetCurrentThreadId()); \
- fprintf(stderr, fmt, __VA_ARGS__); \
+ fprintf(stderr, "DBUG (pid:%ld, tid: %ld): ", GetCurrentProcessId(), GetCurrentThreadId()); \
+ fprintf(stderr, fmt, ##__VA_ARGS__); \
fprintf(stderr, "\n"); \
fflush(stderr); \
}; \