diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2011-10-11 19:36:47 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2011-10-11 19:36:47 (GMT) |
commit | 62312e26ff8496eb5be4b45d655171c073ddbf39 (patch) | |
tree | 7f3ca859bff4440ce8f1b5d88e2e9be616e01689 /src/H5win32defs.h | |
parent | 3fa119253b4bf22a4bbc21e8e36848c390e0d3f2 (diff) | |
download | hdf5-62312e26ff8496eb5be4b45d655171c073ddbf39.zip hdf5-62312e26ff8496eb5be4b45d655171c073ddbf39.tar.gz hdf5-62312e26ff8496eb5be4b45d655171c073ddbf39.tar.bz2 |
[svn-r21519] Merge of 21518 from trunk
- Added definition for HDfseek() to be used later.
- Added comment about requiring _O_BINARY being set on Windows to avoid CR-LF issues.
Tested on Windows (minor changes).
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r-- | src/H5win32defs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 5daef23..5f886d1 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -33,8 +33,9 @@ typedef __int64 h5_stat_size_t; #define HDdup(F) _dup(F) #define HDfdopen(N,S) _fdopen(N,S) #define HDfileno(F) _fileno(F) -#define HDftruncate(F,L) _chsize_s(F,L) +#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) @@ -43,6 +44,9 @@ typedef __int64 h5_stat_size_t; #define HDlstat(S,B) _lstati64(S,B) #define HDmkdir(S,M) _mkdir(S) #define HDoff_t __int64 +/* _O_BINARY must be set in Windows to avoid CR-LF <-> LF EOL + * transformations when performing I/O. + */ #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)) |