summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-13 13:21:16 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-13 13:21:16 (GMT)
commite15ad88d9eb2962dc77848ac156d8b540bbb308d (patch)
treef7d91397b6f600e228b9c08541c0dc8af36c4b56 /src
parent928d398be4143546e57c50788b429095328cb3ba (diff)
parentab045c634cac0219939b93a1d2b829e7b1f3e7a1 (diff)
downloadhdf5-e15ad88d9eb2962dc77848ac156d8b540bbb308d.zip
hdf5-e15ad88d9eb2962dc77848ac156d8b540bbb308d.tar.gz
hdf5-e15ad88d9eb2962dc77848ac156d8b540bbb308d.tar.bz2
[svn-r24701] merge from trunk to 24700.
fix return type for H5T_committed in H5Tget_create_plist.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/H5AC.c90
-rw-r--r--src/H5HFman.c6
-rw-r--r--src/H5R.c13
-rw-r--r--src/H5Tcommit.c2
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in2
7 files changed, 63 insertions, 59 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 743a706..266f54e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -881,8 +881,9 @@ ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
IF (HDF5_EXPORTED_TARGETS)
-
- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries)
+ IF (BUILD_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries)
+ ENDIF (BUILD_SHARED_LIBS)
INSTALL (
TARGETS
diff --git a/src/H5AC.c b/src/H5AC.c
index a26fae1..1a7d27b 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -512,58 +512,52 @@ H5AC_create(const H5F_t *f,
if((mpi_size = H5F_mpi_get_size(f)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi size")
- /* There is no point in setting up the auxilary structure if size
- * is less than or equal to 1, as there will never be any processes
- * to broadcast the clean lists to.
- */
- if(mpi_size > 1) {
- if(NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxilary structure.")
-
- aux_ptr->magic = H5AC__H5AC_AUX_T_MAGIC;
- aux_ptr->mpi_comm = mpi_comm;
- aux_ptr->mpi_rank = mpi_rank;
- aux_ptr->mpi_size = mpi_size;
- aux_ptr->write_permitted = FALSE;
- aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
- aux_ptr->dirty_bytes = 0;
- aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
+ if(NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxilary structure.")
+
+ aux_ptr->magic = H5AC__H5AC_AUX_T_MAGIC;
+ aux_ptr->mpi_comm = mpi_comm;
+ aux_ptr->mpi_rank = mpi_rank;
+ aux_ptr->mpi_size = mpi_size;
+ aux_ptr->write_permitted = FALSE;
+ aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
+ aux_ptr->dirty_bytes = 0;
+ aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- aux_ptr->dirty_bytes_propagations = 0;
- aux_ptr->unprotect_dirty_bytes = 0;
- aux_ptr->unprotect_dirty_bytes_updates = 0;
- aux_ptr->insert_dirty_bytes = 0;
- aux_ptr->insert_dirty_bytes_updates = 0;
- aux_ptr->move_dirty_bytes = 0;
- aux_ptr->move_dirty_bytes_updates = 0;
+ aux_ptr->dirty_bytes_propagations = 0;
+ aux_ptr->unprotect_dirty_bytes = 0;
+ aux_ptr->unprotect_dirty_bytes_updates = 0;
+ aux_ptr->insert_dirty_bytes = 0;
+ aux_ptr->insert_dirty_bytes_updates = 0;
+ aux_ptr->move_dirty_bytes = 0;
+ aux_ptr->move_dirty_bytes_updates = 0;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
- aux_ptr->d_slist_ptr = NULL;
- aux_ptr->d_slist_len = 0;
- aux_ptr->c_slist_ptr = NULL;
- aux_ptr->c_slist_len = 0;
- aux_ptr->candidate_slist_ptr = NULL;
- aux_ptr->candidate_slist_len = 0;
- aux_ptr->write_done = NULL;
- aux_ptr->sync_point_done = NULL;
-
- sprintf(prefix, "%d:", mpi_rank);
-
- if(mpi_rank == 0) {
- if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list.")
-
- if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list.")
- } /* end if */
-
- /* construct the candidate slist for all processes.
- * when the distributed strategy is selected as all processes
- * will use it in the case of a flush.
- */
- if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list.")
+ aux_ptr->d_slist_ptr = NULL;
+ aux_ptr->d_slist_len = 0;
+ aux_ptr->c_slist_ptr = NULL;
+ aux_ptr->c_slist_len = 0;
+ aux_ptr->candidate_slist_ptr = NULL;
+ aux_ptr->candidate_slist_len = 0;
+ aux_ptr->write_done = NULL;
+ aux_ptr->sync_point_done = NULL;
+
+ sprintf(prefix, "%d:", mpi_rank);
+
+ if(mpi_rank == 0) {
+ if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list.")
+
+ if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list.")
} /* end if */
+ /* construct the candidate slist for all processes.
+ * when the distributed strategy is selected as all processes
+ * will use it in the case of a flush.
+ */
+ if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list.")
+
if(aux_ptr != NULL) {
if(aux_ptr->mpi_rank == 0) {
f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
diff --git a/src/H5HFman.c b/src/H5HFman.c
index b43356f..23afb5e 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -554,12 +554,14 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
/* Decode the object offset within the heap & it's length */
UINT64DECODE_VAR(id, obj_off, hdr->heap_off_size);
UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size);
- HDassert(obj_off > 0);
- HDassert(obj_len > 0);
/* Check for bad offset or length */
+ if(obj_off == 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset")
if(obj_off > hdr->man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large")
+ if(obj_len == 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size")
if(obj_len > hdr->man_dtable.cparam.max_direct_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block")
if(obj_len > hdr->max_man_size)
diff --git a/src/H5R.c b/src/H5R.c
index d6780da..111edcd 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -930,7 +930,6 @@ H5R_get_name(H5G_loc_t *loc, hid_t lapl_id, hid_t dxpl_id, H5R_type_t ref_type,
/* Check args */
HDassert(_ref);
- HDassert(name);
/* Get the file pointer from the entry */
f = loc->oloc->file;
@@ -1005,8 +1004,10 @@ done:
object that the dataset is located within.
H5R_type_t ref_type; IN: Type of reference
void *ref; IN: Reference to query.
- char *name; OUT: Buffer to place name of object referenced
- size_t size; IN: Size of name buffer
+ char *name; OUT: Buffer to place name of object referenced. If NULL
+ then this call will return the size in bytes of name.
+ size_t size; IN: Size of name buffer (user needs to include NULL terminator
+ when passing in the size)
RETURNS
Non-negative length of the path on success, Negative on failure
@@ -1018,6 +1019,12 @@ done:
This may not be the only path to that object.
EXAMPLES
REVISION LOG
+ M. Scot Breitenfeld
+ 22 January 2014
+ Changed the behavior for the returned value of the function when name is NULL.
+ If name is NULL then size is ignored and the function returns the size
+ of the name buffer (not including the NULL terminator), it still returns
+ negative on failure.
--------------------------------------------------------------------------*/
ssize_t
H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index f22d8b0..a483df7 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -661,7 +661,7 @@ H5Tget_create_plist(hid_t dtype_id)
{
H5T_t *type; /* Datatype object for ID */
H5P_genplist_t *tcpl_plist; /* Existing datatype creation propertty list */
- herr_t status; /* Generic status value */
+ htri_t status; /* Generic status value */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
diff --git a/src/H5public.h b/src/H5public.h
index 0138d01..5bfc909 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -75,10 +75,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 170 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 172 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.170" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.172" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.in b/src/Makefile.in
index cb96d97..bff0572 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -520,7 +520,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 160
+LT_VERS_REVISION = 162
LT_VERS_AGE = 0
# Our main target, the HDF5 library