summaryrefslogtreecommitdiffstats
path: root/src/H5L.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-07-20 21:47:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-07-20 21:47:15 (GMT)
commit08bb61054759d30c048af7baf1ca144b93ac9ce0 (patch)
tree6267483df5703b615d7b657145fa9bbe80ee8ee7 /src/H5L.c
parent0a5bcc1df0ee1008e7c967facaa8b06797b669e1 (diff)
downloadhdf5-08bb61054759d30c048af7baf1ca144b93ac9ce0.zip
hdf5-08bb61054759d30c048af7baf1ca144b93ac9ce0.tar.gz
hdf5-08bb61054759d30c048af7baf1ca144b93ac9ce0.tar.bz2
[svn-r21133] Description:
More code cleanups to reduce coupling between packages that use the H5F internal routines, but really aren't part of the H5F "package". Tested on: FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Mac OS X/32 10.6.8 (amazon) in debug mode
Diffstat (limited to 'src/H5L.c')
-rw-r--r--src/H5L.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/H5L.c b/src/H5L.c
index 2a9d591..17b7598 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -17,7 +17,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
#define H5L_PACKAGE /*suppress error about including H5Lpkg */
@@ -32,7 +31,7 @@
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5Gpkg.h" /* Groups */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5Iprivate.h" /* IDs */
#include "H5Lpkg.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
@@ -1697,7 +1696,7 @@ H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t UNUSED
} /* end if */
else {
/* Check that both objects are in same file */
- if(grp_loc->oloc->file->shared != udata->file->shared)
+ if(!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "interfile hard links are not allowed")
} /* end else */
} /* end if */
@@ -1776,7 +1775,7 @@ done:
oloc.file = grp_loc->oloc->file;
oloc.addr = udata->lnk->u.hard.addr;
- /* Decrement refcount on superblock extension's object header in memory */
+ /* Decrement refcount on new object's object header in memory */
if(H5O_dec_rc_by_loc(&oloc, udata->dxpl_id) < 0)
HDONE_ERROR(H5E_LINK, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
} /* end if */
@@ -2429,7 +2428,7 @@ H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
/* Check for crossing file boundaries with a new hard link */
if(udata->lnk->type == H5L_TYPE_HARD) {
/* Check that both objects are in same file */
- if(grp_loc->oloc->file->shared != udata->file->shared)
+ if(!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "moving a link across files is not allowed")
} /* end if */