diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-08-07 19:40:04 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-08-07 19:40:04 (GMT) |
commit | 0ed65346033e7fbc71634d4911f9761e2ec145b2 (patch) | |
tree | 4d1753da7112852d003bda9bd535b5892a8e13d1 /test | |
parent | 51ab52ad4298913d18d1f8c3be7e2c2a410c58a8 (diff) | |
download | hdf5-0ed65346033e7fbc71634d4911f9761e2ec145b2.zip hdf5-0ed65346033e7fbc71634d4911f9761e2ec145b2.tar.gz hdf5-0ed65346033e7fbc71634d4911f9761e2ec145b2.tar.bz2 |
Fixes flock Windows failure
Diffstat (limited to 'test')
-rw-r--r-- | test/h5test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/h5test.c b/test/h5test.c index 255932a..497a5f2 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -2255,15 +2255,15 @@ done: *------------------------------------------------------------------------- */ herr_t -h5_check_if_file_locking_enabled(hbool_t *are_enabled) +h5_check_if_file_locking_enabled(hbool_t *is_enabled) { const char *filename = "locking_test_file"; - mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; + int pmode = O_RDWR | O_CREAT | O_TRUNC; int fd = -1; - *are_enabled = TRUE; + *is_enabled = TRUE; - if((fd = HDcreat(filename, mode)) < 0) + if((fd = HDopen(filename, pmode, H5_POSIX_CREATE_MODE_RW)) < 0) goto error; /* Test HDflock() to see if it works */ @@ -2277,7 +2277,7 @@ h5_check_if_file_locking_enabled(hbool_t *are_enabled) * error condition. */ errno = 0; - *are_enabled = FALSE; + *is_enabled = FALSE; } else goto error; @@ -2293,7 +2293,7 @@ h5_check_if_file_locking_enabled(hbool_t *are_enabled) return SUCCEED; error: - *are_enabled = FALSE; + *is_enabled = FALSE; if (fd > -1) { HDclose(fd); HDremove(filename); |