summaryrefslogtreecommitdiffstats
path: root/src/H5FDstdio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-04-28 01:02:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-04-28 01:02:02 (GMT)
commit0081d8f082bd9fa8c424439b8fb561101dbec78e (patch)
tree503459c0b8fd32f67ed0da1cc062143998601b25 /src/H5FDstdio.c
parentde925f4b385044e2873cf07c3179ce80f56c8c80 (diff)
parent0ef7cabc633e303f61305362e07b86375aa0753f (diff)
downloadhdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.zip
hdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.tar.gz
hdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.tar.bz2
[svn-r20658] Description:
Bring code contribution from John Biddiscombe into trunk, according to IP assignment #002 (on file). Checkin message from John is: This patch includes the changes necessary to compile a Virtual File Driver outside of the main hdf5 build and still have it link against the hdf5 core and work correctly at run-time. Certain MPI-IO related VFD checks were hard-coded in the hdf5 source and so it was not possible to extend the functionality to new drivers. Removed IS_H5FD_MPI macros and replaced with H5F_HAS_FEATURE calls with new keys, H5FD_FEAT_HAS_MPI and H5FD_FEAT_ALLOCATE_EARLY. Change H5FD cleanup (term_interface) so that file drivers call terminate when their class types are deleted instead of explicitly being called from the finalization code. Move the terminate call out of H5I and put it into the FD class_free call. Remove the now obsolete check of handles after cleaning types at termination time. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode 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 Linux/64-ia64 2.6 (ember) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r--src/H5FDstdio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 9bc4161..4c53769 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -170,6 +170,7 @@ typedef struct H5FD_stdio_t {
HADDR_UNDEF==(A)+(Z) || (file_offset_t)((A)+(Z))<(file_offset_t)(A))
/* Prototypes */
+static herr_t H5FD_stdio_term(void);
static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD_stdio_close(H5FD_t *lf);
@@ -191,6 +192,7 @@ static const H5FD_class_t H5FD_stdio_g = {
"stdio", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_stdio_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
@@ -257,21 +259,20 @@ H5FD_stdio_init(void)
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_stdio_term(void)
{
/* Reset VFL ID */
H5FD_STDIO_g=0;
+ return 0;
} /* end H5FD_stdio_term() */