From a32e42daf6e5f8061390dad1674726275ab1e323 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 17 Feb 2013 20:51:22 +0100 Subject: Fix definition for snprintf() on WIN32 --- nanohttp/nanohttp-client.c | 2 +- nanohttp/nanohttp-server.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c index 84c2676..f11fb28 100644 --- a/nanohttp/nanohttp-client.c +++ b/nanohttp/nanohttp-client.c @@ -63,7 +63,7 @@ #endif #ifdef WIN32 -#define snprintf(buffer, num, s1, s2) sprintf(buffer, s1,s2) +#define snprintf(buffer, num, ...) sprintf(buffer, __VA_ARGS__) #endif #include "nanohttp-logging.h" diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c index fee63fc..df87dc1 100644 --- a/nanohttp/nanohttp-server.c +++ b/nanohttp/nanohttp-server.c @@ -160,7 +160,7 @@ static int _httpd_max_idle = 120; HANDLE _httpd_connection_lock; LPCTSTR _httpd_connection_lock_str; #define strncasecmp(s1, s2, num) strncmp(s1, s2, num) -#define snprintf(buffer, num, s1, s2) sprintf(buffer, s1,s2) +#define snprintf(buffer, num, ...) sprintf(buffer, __VA_ARGS__) #else static int _httpd_terminate_signal = SIGINT; static sigset_t thrsigset; -- cgit v1.1-32-gdbae