1 #ifdef WIN32 2 3 #ifndef roundup 4 #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) 5 #endif 6 7 #include <stdlib.h> 8 #include <stdarg.h> 9 10 int 11 #if __STDC__ 12 vsnprintf(char *str, size_t n, char const *fmt, va_list ap); 13 #else 14 vsnprintf(str, n, fmt, ap); 15 char *str; 16 size_t n; 17 char *fmt; 18 char *ap; 19 #endif 20 21 22 int 23 #if __STDC__ 24 snprintf(char *str, size_t n, char const *fmt, ...); 25 #else 26 snprintf(str, n, fmt, va_alist); 27 char *str; 28 size_t n; 29 char *fmt; 30 va_dcl 31 #endif 32 33 #endif 34