summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2011-10-11 19:35:43 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2011-10-11 19:35:43 (GMT)
commit523d36bf4d17f059931e25ad00713bf5e6976fd4 (patch)
tree3df8e699890aad1bb12ec25f0290248ddf005df3
parent3674c78a6ee2be3292bafd3d7dae28a90a52b699 (diff)
downloadhdf5-523d36bf4d17f059931e25ad00713bf5e6976fd4.zip
hdf5-523d36bf4d17f059931e25ad00713bf5e6976fd4.tar.gz
hdf5-523d36bf4d17f059931e25ad00713bf5e6976fd4.tar.bz2
[svn-r21518] - 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).
-rw-r--r--src/H5win32defs.h6
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))