summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-10-13 19:16:54 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-10-13 19:16:54 (GMT)
commitc9d37a8e3f4fe142f6beee0a1117d9904659456d (patch)
treedc3914139b32563a0b28fcfb3e14d0092ede705a /test/h5test.c
parent63d0b371336ce23f3ab747c9ec01a82ac04376da (diff)
downloadhdf5-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 'test/h5test.c')
-rw-r--r--test/h5test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 03fa3b7..029ca3e 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -854,6 +854,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
{
char temp[2048]; /* Temporary buffer for file names */
h5_stat_t sb; /* Structure for querying file info */
+ int j = 0;
if(fapl == H5P_DEFAULT) {
/* Get the file's statistics */
@@ -910,7 +911,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
h5_stat_size_t tot_size = 0;
/* Try all filenames possible, until we find one that's missing */
- for(int j = 0; /*void*/; j++) {
+ for(j = 0; /*void*/; j++) {
/* Create the filename to query */
HDsnprintf(temp, sizeof temp, filename, j);