diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-03-29 16:47:26 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-03-29 16:47:26 (GMT) |
commit | b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533 (patch) | |
tree | 45cf4d20c4c02bf0d718e40b29796cecbc792b60 /src | |
parent | 03ee4aa0eecf1a87d0d0da2454c532a38e37a38e (diff) | |
download | hdf5-b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533.zip hdf5-b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533.tar.gz hdf5-b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533.tar.bz2 |
[svn-r22186] MinGW compile issues fixed.
Tested: windows (big test using stdio only fails - this will be filed for further investigation)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDstdio.c | 6 | ||||
-rw-r--r-- | src/H5private.h | 2 | ||||
-rw-r--r-- | src/H5win32defs.h | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 8e970c6..647836f 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -44,6 +44,10 @@ #endif #ifdef H5_HAVE_WIN32_API +/* The following two defines must be before any windows headers are included */ +#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ +#define NOGDI /* Exclude Graphic Display Interface macros */ + #include <windows.h> #include <io.h> @@ -115,10 +119,12 @@ typedef struct H5FD_stdio_t { /* Use similar structure as in H5private.h by defining Windows stuff first. */ #ifdef H5_HAVE_WIN32_API + #ifndef H5_HAVE_MINGW # define file_fseek _fseeki64 # define file_offset_t __int64 # define file_ftruncate _chsize_s /* Supported in VS 2005 or newer */ # define file_ftell _ftelli64 + #endif #endif /* Use file_xxx to indicate these are local macros, avoiding confusing diff --git a/src/H5private.h b/src/H5private.h index 5bdd8ed..7d67dec 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -151,7 +151,9 @@ #ifdef H5_HAVE_WIN32_API +/* The following two defines must be before any windows headers are included */ #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ +#define NOGDI /* Exclude Graphic Display Interface macros */ #ifdef H5_HAVE_WINSOCK_H #include <winsock2.h> diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 5f886d1..e9b87625 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -33,9 +33,7 @@ typedef __int64 h5_stat_size_t; #define HDdup(F) _dup(F) #define HDfdopen(N,S) _fdopen(N,S) #define HDfileno(F) _fileno(F) -#define HDfseek(F,O,W) _fseeki64(F,O,W) #define HDfstat(F,B) _fstati64(F,B) -#define HDftruncate(F,L) _chsize_s(F,L) #define HDisatty(F) _isatty(F) #define HDgetcwd(S,Z) _getcwd(S,Z) #define HDgetdcwd(D,S,Z) _getdcwd(D,S,Z) @@ -91,4 +89,8 @@ struct timezone { * type cannot be cast as a ulong like other systems. */ #define HDpthread_self_ulong() ((unsigned long)GetCurrentThreadId()) +#ifndef H5_HAVE_MINGW +#define HDftruncate(F,L) _chsize_s(F,L) +#define HDfseek(F,O,W) _fseeki64(F,O,W) +#endif #endif /* H5_HAVE_WIN32_API */ |