For Windows MinGW address the "ISO C99 requires rest arguments to be used" error
Alex Lian
11 years ago
29 | 29 | # include <winerror.h> |
30 | 30 | # include "win32/err.h" |
31 | 31 | # if defined (__MINGW32__) |
32 | # define snprintf(S, n, F, ...) sprintf(S, F, __VA_ARGS__) | |
32 | /* | |
33 | * Cheating here on the snprintf to incorporate the format argument | |
34 | * into the VA_ARGS. Else we get MinGW errors regarding number of arguments | |
35 | * if doing a fixed string with no arguments. | |
36 | */ | |
37 | # define snprintf(S, n, ...) sprintf(S, __VA_ARGS__) | |
33 | 38 | # define pipe(fds) _pipe(fds, 5000, _O_BINARY) |
34 | 39 | # define ETIMEDOUT WSAETIMEDOUT |
35 | 40 | # define ENOTSUP WSAEOPNOTSUPP |