diff options
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/H5private.h b/src/H5private.h index 899cf87..7bb732c 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -798,8 +798,12 @@ typedef off_t h5_stat_size_t; #define HDsinh(X) sinh(X) #define HDsleep(N) sleep(N) #ifdef H5_HAVE_SNPRINTF +#ifdef WIN32 +#define HDsnprintf _snprintf /*varargs*/ +#else # define HDsnprintf snprintf /*varargs*/ #endif +#endif /* sprintf() variable arguments */ #define HDsqrt(X) sqrt(X) #define HDsrand(N) srand(N) @@ -880,8 +884,12 @@ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDvprintf(FMT,A) vprintf(FMT,A) #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A) #ifdef H5_HAVE_VSNPRINTF +#ifdef WIN32 +# define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) +#else # define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A) #endif +#endif #define HDwait(W) wait(W) #define HDwaitpid(P,W,O) waitpid(P,W,O) #define HDwcstombs(S,P,Z) wcstombs(S,P,Z) @@ -914,20 +922,11 @@ extern char *strdup(const char *s); #ifndef H5_HAVE_SNPRINTF - H5_DLL int HDsnprintf(char *buf, size_t size, const char *fmt, ...); -#ifdef WIN32 -#define HDsnprintf _snprintf /*varargs*/ -#endif - #endif #ifndef H5_HAVE_VSNPRINTF H5_DLL int HDvsnprintf(char *buf, size_t size, const char *fmt, va_list ap); -#ifdef WIN32 -#define HDvsnprintf _vsnprintf /*varargs*/ -#endif - #endif /* |