summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-03-22 17:51:16 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-03-22 17:51:16 (GMT)
commit035c00dcef827676d4e28fa2d8cc46afddb7e94c (patch)
treef635f00a7bd2dfe49a636f572e42f114a434803e /src
parent019daa1b2e1593bcc26613379d76ba92b2a62f80 (diff)
downloadhdf5-035c00dcef827676d4e28fa2d8cc46afddb7e94c.zip
hdf5-035c00dcef827676d4e28fa2d8cc46afddb7e94c.tar.gz
hdf5-035c00dcef827676d4e28fa2d8cc46afddb7e94c.tar.bz2
[svn-r1156]
made a change to compare files function. for NT we look at the path names of the 2 objects.
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/H5F.c b/src/H5F.c
index b2f351d..a35bec9 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -490,10 +490,18 @@ H5F_compare_files(void * _obj, const void * _key)
int ret_value = FALSE;
FUNC_ENTER(H5F_compare_files, FALSE);
-
+#if WIN32
+ ret_value = stricmp(key->path, obj->shared->key.path);
+ if (ret_value){
+ ret_value = FALSE;
+ }
+ else {
+ ret_value = TRUE;
+ }
+#else
ret_value = (obj->shared->key.dev == key->dev &&
- obj->shared->key.ino == key->ino);
-
+ obj->shared->key.ino == key->ino);
+#endif
FUNC_LEAVE(ret_value);
}
@@ -945,6 +953,7 @@ H5F_open(const char *name, uintn flags,
HRETURN_ERROR(H5E_FILE, H5E_WRITEERROR, NULL,
"file is not writable");
}
+
if ((old = H5I_search(H5I_FILE, H5F_compare_files, &search)) ||
(old = H5I_search(H5I_FILE_CLOSING, H5F_compare_files, &search))) {
if (flags & H5F_ACC_TRUNC) {
@@ -965,7 +974,9 @@ H5F_open(const char *name, uintn flags,
}
f = H5F_new(old->shared, NULL, NULL);
- } else if (flags & H5F_ACC_TRUNC) {
+ }
+
+ else if (flags & H5F_ACC_TRUNC) {
/* Truncate existing file */
if (0 == (flags & H5F_ACC_RDWR)) {
HRETURN_ERROR(H5E_FILE, H5E_BADVALUE, NULL,