diff options
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r-- | src/H5win32defs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 6ce8f77..141ec82 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -33,11 +33,27 @@ typedef __int64 h5_stat_size_t; #define HDdup(F) _dup(F) #define HDfdopen(N,S) _fdopen(N,S) #define HDfileno(F) _fileno(F) +#if _MSC_VER > 1310 /* Newer than VS.NET 2003 */ +#define HDftruncate(F,L) _chsize_s(F,L) +#else +#define HDftruncate(F,L) chsize(F,L) +#endif #define HDfstat(F,B) _fstati64(F,B) #define HDisatty(F) _isatty(F) +#define HDlstat(S,B) _lstati64(S,B) #define HDstat(S,B) _stati64(S,B) #define HDgetcwd(S,Z) _getcwd(S,Z) #define HDgetdcwd(D,S,Z) _getdcwd(D,S,Z) +#ifndef H5_HAVE_GETTIMEOFDAY + #ifdef __cplusplus + extern "C" { + #endif /* __cplusplus */ + H5_DLL int HDgettimeofday(struct timeval *tv, void *tz); + #ifdef __cplusplus + } + #endif /* __cplusplus */ + #define HDgettimeofday(V,Z) HDgettimeofday(V,Z) +#endif /* H5_HAVE_GETTIMEOFDAY */ #define HDgetdrive() _getdrive() #define HDlseek(F,O,W) _lseeki64(F,O,W) #define HDmemset(X,C,Z) memset((void*)(X),C,Z) @@ -45,6 +61,9 @@ typedef __int64 h5_stat_size_t; #define HDopen(S,F,M) _open(S,F|_O_BINARY,M) #define HDread(F,M,Z) _read(F,M,Z) #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2)) +#define HDsleep(S) Sleep(S*1000) +#define HDstrcasecmp(A,B) _stricmp(A,B) +#define HDstrtoull(S,R,N) _strtoui64(S,R,N) #define HDstrdup(S) _strdup(S) #define HDsnprintf _snprintf /*varargs*/ #define HDtzset() _tzset() |