From 16dd775f8fd536816d0565a8f180105147717b22 Mon Sep 17 00:00:00 2001 From: Fang Guo Date: Mon, 22 Aug 2005 14:03:00 -0500 Subject: [svn-r11288] Purpose: Maintenance on Windows Description: Move Win32 Macros(snprintf and vsnprintf) to the right places Solution: Platforms tested: MSVS 6.0 on Windows XP heping Misc. update: --- src/H5private.h | 17 ++++++++--------- 1 file 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 /* -- cgit v0.12