diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2008-10-13 19:16:54 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2008-10-13 19:16:54 (GMT) |
commit | c9d37a8e3f4fe142f6beee0a1117d9904659456d (patch) | |
tree | dc3914139b32563a0b28fcfb3e14d0092ede705a /src/H5win32defs.h | |
parent | 63d0b371336ce23f3ab747c9ec01a82ac04376da (diff) | |
download | hdf5-c9d37a8e3f4fe142f6beee0a1117d9904659456d.zip hdf5-c9d37a8e3f4fe142f6beee0a1117d9904659456d.tar.gz hdf5-c9d37a8e3f4fe142f6beee0a1117d9904659456d.tar.bz2 |
[svn-r15855] Purpose: Bring recent Windows-specific fixes from 1.8 branch to trunk
Description:
This checkin includes revisions 15845, 15846, and 15853 from the 1.8 branch. From the svn log:
r15845:
Purpose: Add Windows-specific version of HDftruncate
Description:
Windows doesn't include a version of the system call ftruncate. There is a similar call, _chsize_s, which performs very similarly. Thus, we map HDftruncate to _chsize_s in our Windows header file, H5win32defs.h.
r15846:
Purpose: Declare loop variable at beginning of function
Description:
On Windows, we were getting compile errors because h5test.c includes a function with variable declarations in the middle of the call. The Microsoft C compiler demands that all variables be declared at the top of the function. This checkin simply moves the declaration to the top to satisfy Visual Studio.
r15853:
Purpose: Decrease size of points array in links test
Description:
In the external_set_elink_fapl2 links test, there is a large array of points which declared on the stack for testing. Previously, the array was 1000 x 1000, which was too large for Visual Studio to handle. As a result, we were getting stack overflows during the test. We've reduced the number to 400, as this seems to be below the limit. The exact number of points in the array isn't important to the test.
Tested:
VS2005 on WinXP
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r-- | src/H5win32defs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 6ce8f77..2f947c1 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -33,6 +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 HDftruncate(F,L) _chsize_s(F,L) #define HDfstat(F,B) _fstati64(F,B) #define HDisatty(F) _isatty(F) #define HDstat(S,B) _stati64(S,B) |