diff options
author | Fang Guo <fangguo@ncsa.uiuc.edu> | 2005-08-22 19:03:00 (GMT) |
---|---|---|
committer | Fang Guo <fangguo@ncsa.uiuc.edu> | 2005-08-22 19:03:00 (GMT) |
commit | 16dd775f8fd536816d0565a8f180105147717b22 (patch) | |
tree | a396a22b51dac3386bdd1804281790f5e845bcaf /src | |
parent | 7cd3b94df2f43b4dc91aefddcef94cc4faed8874 (diff) | |
download | hdf5-16dd775f8fd536816d0565a8f180105147717b22.zip hdf5-16dd775f8fd536816d0565a8f180105147717b22.tar.gz hdf5-16dd775f8fd536816d0565a8f180105147717b22.tar.bz2 |
[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:
Diffstat (limited to 'src')
-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 /* |