summaryrefslogtreecommitdiffstats
path: root/src/H5win32defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r--src/H5win32defs.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 0cf7172..49e445d 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -33,18 +33,26 @@ 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 > 1200
+#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 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 */
+ 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)
@@ -52,13 +60,13 @@ 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 HDstrcasecmp(A,B) _stricmp(A,B)
#define HDstrdup(S) _strdup(S)
#define HDsnprintf _snprintf /*varargs*/
#define HDtzset() _tzset()
#define HDunlink(S) _unlink(S)
#define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A)
#define HDwrite(F,M,Z) _write(F,M,Z)
-#define HDstrtoull(S,R,N) _strtoui64(S,R,N)
/* Non-POSIX functions */