diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2007-06-18 18:19:56 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2007-06-18 18:19:56 (GMT) |
commit | 5e7acfed72dab3bb0a653067b99b18368bdba3f3 (patch) | |
tree | 17e32ef2d3351720f7a8c4e3f2ae859fac812311 /windows | |
parent | 4d9397a1019cfd08dd36564a34d89bda294996ff (diff) | |
download | hdf5-5e7acfed72dab3bb0a653067b99b18368bdba3f3.zip hdf5-5e7acfed72dab3bb0a653067b99b18368bdba3f3.tar.gz hdf5-5e7acfed72dab3bb0a653067b99b18368bdba3f3.tar.bz2 |
[svn-r13873] Purpose: Code cleanup
Description:
Changed a macro in H5FDwindows.c from IO_BUF_SIZE to a more specific WINDOWS_MAX_BUF, and moved it to our H5pubconf.h, where users can customize it to their own preference.
This value is needed because of a bug in the Windows _write function, it is unsafe to write buffers larger than 2GB-1 bytes in one write.
Tested:
VS2005 on WinXP.
Diffstat (limited to 'windows')
-rwxr-xr-x | windows/src/H5pubconf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index aac8f41..9c4ef9b 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -126,9 +126,16 @@ in the file file_io.win32.c and including it on the projects #define H5_HAVE_WINDOWS 1 #ifdef H5_HAVE_WINDOWS + /* uncomment the following line if you would like to use the buffered stdio functions in the Windows file driver. */ // #define WINDOWS_USE_STDIO 1 + +/* this value controls the maximum data written in one write call in the + * Windows file driver. Safe values are between 1 <= IO_BUF_SIZE <= 2GB-1. + * The default is 1GB. */ +#define WINDOWS_MAX_BUF 1073741824 + #endif /* H5_HAVE_WINDOWS */ /* comment the following line out if you are not using N-bit filter*/ |