diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:36:07 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:36:07 +0000 |
commit | c9bc1c48ada4927400c5584d2dba896786e1ce53 (patch) | |
tree | 721fe227bf1a5642b01d6f95d3e6ad3271dbd8ba | |
parent | aace9f53a05a8ce996bbfec89e88895ca8b9e755 (diff) | |
download | libusb-c9bc1c48ada4927400c5584d2dba896786e1ce53.tar.gz |
svn r56: - MSVC6 compatible printb in windows_compat.c
-rw-r--r-- | libusb/os/windows_compat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libusb/os/windows_compat.c b/libusb/os/windows_compat.c index 56feb15..97ef720 100644 --- a/libusb/os/windows_compat.c +++ b/libusb/os/windows_compat.c @@ -77,10 +77,16 @@ // Uncomment to debug the polling layer //#define DEBUG_WINDOWS_COMPAT #if defined(DEBUG_WINDOWS_COMPAT) -#define printb(...) printf(__VA_ARGS__) +#define printb printf +#else +// MSVC6 cannot use a variadic argument and non MSVC +// compilers produce warnings if parenthesis are ommitted. +#if defined(_MSC_VER) +#define printb #else #define printb(...) #endif +#endif #define CHECK_INIT_POLLING do {if(!is_polling_set) init_polling();} while(0)
@@ -102,7 +108,6 @@ unsigned short pipe_number = 0; void init_polling(void) { int i; - // This might not if (is_polling_set) { // The sleep 1 sec is to give enough time for our initialization // below to finish, should concurrent simultaneous inits be issued |