summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-04-06 17:08:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-04-06 17:08:37 (GMT)
commitedebad0e78f322580c17647e57f6e74a1d0f5dcf (patch)
tree4edc97d13bc2131413654a30359942db2585e916
parentd5a62239587f7cc5de301fa5c6b0919807689818 (diff)
downloadhdf5-edebad0e78f322580c17647e57f6e74a1d0f5dcf.zip
hdf5-edebad0e78f322580c17647e57f6e74a1d0f5dcf.tar.gz
hdf5-edebad0e78f322580c17647e57f6e74a1d0f5dcf.tar.bz2
[svn-r22255] Fix windows compile errors:
vs2008 needed H5private.h in H5Oflush.c VS needs windows export decoration (H5DLLVAR) in header used by source file of origin Tested: windows
-rw-r--r--src/H5EApkg.h76
-rw-r--r--src/H5EAprivate.h20
-rw-r--r--src/H5FApkg.h62
-rw-r--r--src/H5FAprivate.h20
-rw-r--r--src/H5Oflush.c19
5 files changed, 99 insertions, 98 deletions
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 8545ef8..c9c79ba 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -14,12 +14,12 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Tuesday, June 17, 2008
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Tuesday, June 17, 2008
*
- * Purpose: This file contains declarations which are visible only within
- * the H5EA package. Source files outside the H5EA package should
- * include H5EAprivate.h instead.
+ * Purpose: This file contains declarations which are visible only within
+ * the H5EA package. Source files outside the H5EA package should
+ * include H5EAprivate.h instead.
*/
#if !(defined(H5EA_PACKAGE) | defined(H5EA_MODULE))
#error "Do not include this file outside the H5EA package!"
@@ -32,7 +32,7 @@
#include "H5EAprivate.h"
/* Other private headers needed by this file */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
@@ -79,15 +79,15 @@
+ 1 /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ \
\
/* Extensible Array statistics fields */ \
- + (h)->sizeof_size /* Number of super blocks created */ \
- + (h)->sizeof_size /* Size of super blocks created */ \
- + (h)->sizeof_size /* Number of data blocks created */ \
- + (h)->sizeof_size /* Size of data blocks created */ \
- + (h)->sizeof_size /* Max. index set */ \
- + (h)->sizeof_size /* Number of elements 'realized' */ \
+ + (h)->sizeof_size /* Number of super blocks created */ \
+ + (h)->sizeof_size /* Size of super blocks created */ \
+ + (h)->sizeof_size /* Number of data blocks created */ \
+ + (h)->sizeof_size /* Size of data blocks created */ \
+ + (h)->sizeof_size /* Max. index set */ \
+ + (h)->sizeof_size /* Number of elements 'realized' */ \
\
/* Extensible Array Header specific fields */ \
- + (h)->sizeof_addr /* File address of index block */ \
+ + (h)->sizeof_addr /* File address of index block */ \
)
/* Size of the extensible array index block on disk */
@@ -95,10 +95,10 @@
/* General metadata fields */ \
H5EA_METADATA_PREFIX_SIZE(TRUE) \
\
- /* Sanity-checking fields */ \
+ /* Sanity-checking fields */ \
+ (i)->hdr->sizeof_addr /* File address of array owning the block */ \
\
- /* Extensible Array Index Block specific fields */ \
+ /* Extensible Array Index Block specific fields */ \
+ ((size_t)(i)->hdr->cparam.idx_blk_elmts * (size_t)(i)->hdr->cparam.raw_elmt_size) /* Elements in index block */ \
+ ((i)->ndblk_addrs * (i)->hdr->sizeof_addr) /* Data block addresses in index block */ \
+ ((i)->nsblk_addrs * (i)->hdr->sizeof_addr) /* Super block addresses in index block */ \
@@ -109,37 +109,37 @@
/* General metadata fields */ \
H5EA_METADATA_PREFIX_SIZE(TRUE) \
\
- /* Sanity-checking fields */ \
+ /* Sanity-checking fields */ \
+ (s)->hdr->sizeof_addr /* File address of array owning the block */ \
+ (s)->hdr->arr_off_size /* Offset of the block in the array */ \
\
- /* Extensible Array Super Block specific fields */ \
+ /* Extensible Array Super Block specific fields */ \
+ ((s)->ndblks * (s)->dblk_page_init_size) /* Data block 'page init' bitmasks in super block (can be 0 if no pages) */ \
+ ((s)->ndblks * (s)->hdr->sizeof_addr) /* Data block addresses in super block */ \
)
/* Size of the extensible array data block prefix on disk */
-#define H5EA_DBLOCK_PREFIX_SIZE(d) ( \
+#define H5EA_DBLOCK_PREFIX_SIZE(d) ( \
/* General metadata fields */ \
H5EA_METADATA_PREFIX_SIZE(TRUE) \
\
- /* Sanity-checking fields */ \
+ /* Sanity-checking fields */ \
+ (d)->hdr->sizeof_addr /* File address of array owning the block */ \
+ (d)->hdr->arr_off_size /* Offset of the block in the array */ \
)
/* Size of the extensible array data block on disk */
-#define H5EA_DBLOCK_SIZE(d) ( \
+#define H5EA_DBLOCK_SIZE(d) ( \
/* Data block prefix size */ \
H5EA_DBLOCK_PREFIX_SIZE(d) \
\
- /* Extensible Array Data Block specific fields */ \
+ /* Extensible Array Data Block specific fields */ \
+ ((d)->nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) /* Elements in data block */ \
+ ((d)->npages * H5EA_SIZEOF_CHKSUM) /* Checksum for each page */ \
)
/* Size of the extensible array data block page on disk */
-#define H5EA_DBLK_PAGE_SIZE(p) ( \
+#define H5EA_DBLK_PAGE_SIZE(p) ( \
+ ((p)->hdr->dblk_page_nelmts * (size_t)(p)->hdr->cparam.raw_elmt_size) /* Elements in data block page */ \
+ H5EA_SIZEOF_CHKSUM /* Checksum for each page */ \
)
@@ -221,9 +221,9 @@ typedef struct H5EA_iblock_t {
/* Internal array information (not stored) */
size_t rc; /* Reference count of objects using this block */
- H5EA_hdr_t *hdr; /* Shared array header info */
- haddr_t addr; /* Address of this index block on disk */
- size_t size; /* Size of index block on disk */
+ H5EA_hdr_t *hdr; /* Shared array header info */
+ haddr_t addr; /* Address of this index block on disk */
+ size_t size; /* Size of index block on disk */
/* Computed/cached values (not stored) */
size_t nsblks; /* # of super blocks whose data block addresses are in index block */
@@ -243,10 +243,10 @@ typedef struct H5EA_sblock_t {
/* Internal array information (not stored) */
size_t rc; /* Reference count of objects using this block */
- H5EA_hdr_t *hdr; /* Shared array header info */
- H5EA_iblock_t *parent; /* Parent object for super block (index block) */
- haddr_t addr; /* Address of this index block on disk */
- size_t size; /* Size of index block on disk */
+ H5EA_hdr_t *hdr; /* Shared array header info */
+ H5EA_iblock_t *parent; /* Parent object for super block (index block) */
+ haddr_t addr; /* Address of this index block on disk */
+ size_t size; /* Size of index block on disk */
/* Computed/cached values (not stored) */
unsigned idx; /* Super block index within the extensible array */
@@ -267,10 +267,10 @@ typedef struct H5EA_dblock_t {
void *elmts; /* Buffer for elements stored in data block */
/* Internal array information (not stored) */
- H5EA_hdr_t *hdr; /* Shared array header info */
+ H5EA_hdr_t *hdr; /* Shared array header info */
void *parent; /* Parent object for data block (index or super block) */
- haddr_t addr; /* Address of this data block on disk */
- size_t size; /* Size of data block on disk */
+ haddr_t addr; /* Address of this data block on disk */
+ size_t size; /* Size of data block on disk */
/* Computed/cached values (not stored) */
size_t nelmts; /* Number of elements in block */
@@ -286,10 +286,10 @@ typedef struct H5EA_dbk_page_t {
void *elmts; /* Buffer for elements stored in data block page */
/* Internal array information (not stored) */
- H5EA_hdr_t *hdr; /* Shared array header info */
+ H5EA_hdr_t *hdr; /* Shared array header info */
H5EA_sblock_t *parent; /* Parent object for data block page (super block) */
haddr_t addr; /* Address of this data block page on disk */
- size_t size; /* Size of data block page on disk */
+ size_t size; /* Size of data block page on disk */
/* Computed/cached values (not stored) */
/* <none> */
@@ -349,17 +349,11 @@ H5_DLLVAR const H5AC_class_t H5AC_EARRAY_DBLOCK[1];
/* H5EA data block page inherits cache-like properties from H5AC */
H5_DLLVAR const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1];
-/* The Extensible Array class for dataset chunks w/o filters*/
-H5_DLLVAR const H5EA_class_t H5EA_CLS_CHUNK[1];
-
-/* The Extensible Array class for dataset chunks w/ filters*/
-H5_DLLVAR const H5EA_class_t H5EA_CLS_FILT_CHUNK[1];
-
/* Internal extensible array testing class */
H5_DLLVAR const H5EA_class_t H5EA_CLS_TEST[1];
/* Array of extensible array client ID -> client class mappings */
-extern const H5EA_class_t *const H5EA_client_class_g[H5EA_NUM_CLS_ID];
+H5_DLLVAR const H5EA_class_t *const H5EA_client_class_g[H5EA_NUM_CLS_ID];
/******************************/
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index feb58b7..60dbca1 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -15,11 +15,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5EAprivate.h
- * Jun 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5EAprivate.h
+ * Jun 17 2008
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Private header for library accessible extensible
+ * Purpose: Private header for library accessible extensible
* array routines.
*
*-------------------------------------------------------------------------
@@ -34,8 +34,8 @@
#endif /* NOT_YET */
/* Private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Fprivate.h" /* File access */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Fprivate.h" /* File access */
/**************************/
@@ -54,7 +54,7 @@ typedef enum H5EA_cls_id_t {
/* Start real class IDs at 0 -QAK */
/* (keep these last) */
- H5EA_CLS_TEST_ID, /* Extensible array is for testing (do not use for actual data) */
+ H5EA_CLS_TEST_ID, /* Extensible array is for testing (do not use for actual data) */
H5EA_NUM_CLS_ID /* Number of Extensible Array class IDs (must be last) */
} H5EA_cls_id_t;
@@ -120,6 +120,12 @@ typedef struct H5EA_t H5EA_t;
/* Library-private Variables */
/*****************************/
+/* The Extensible Array class for dataset chunks w/o filters*/
+H5_DLLVAR const H5EA_class_t H5EA_CLS_CHUNK[1];
+
+/* The Extensible Array class for dataset chunks w/ filters*/
+H5_DLLVAR const H5EA_class_t H5EA_CLS_FILT_CHUNK[1];
+
/***************************************/
/* Library-private Function Prototypes */
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index d0093a6..b06406a 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -16,9 +16,9 @@
/*
* Programmer:
*
- * Purpose: This file contains declarations which are visible only within
- * the H5FA package. Source files outside the H5FA package should
- * include H5FAprivate.h instead.
+ * Purpose: This file contains declarations which are visible only within
+ * the H5FA package. Source files outside the H5FA package should
+ * include H5FAprivate.h instead.
*/
#if !(defined(H5FA_PACKAGE) | defined(H5FA_MODULE))
#error "Do not include this file outside the H5FA package!"
@@ -31,8 +31,8 @@
#include "H5FAprivate.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
@@ -65,7 +65,7 @@
#define H5FA_METADATA_PREFIX_SIZE(c) ( \
H5_SIZEOF_MAGIC /* Signature */ \
+ 1 /* Version */ \
- + 1 /* Array type */ \
+ + 1 /* Array type */ \
+ ((c) ? H5FA_SIZEOF_CHKSUM : 0) /* Metadata checksum */ \
)
@@ -79,10 +79,10 @@
+ 1 /* Log2(Max. # of elements in data block page) - i.e. # of bits needed to store max. # of elements in data block page */ \
\
/* Fixed Array statistics fields */ \
- + (h)->sizeof_size /* # of elements in the fixed array */ \
+ + (h)->sizeof_size /* # of elements in the fixed array */ \
\
/* Fixed Array Header specific fields */ \
- + (h)->sizeof_addr /* File address of Fixed Array data block */ \
+ + (h)->sizeof_addr /* File address of Fixed Array data block */ \
)
/* Size of the Fixed Array data block prefix on disk */
@@ -91,27 +91,27 @@
H5FA_METADATA_PREFIX_SIZE(TRUE) \
\
/* Sanity-checking fields */ \
- + (d)->hdr->sizeof_addr /* File address of Fixed Array header owning the data block */ \
+ + (d)->hdr->sizeof_addr /* File address of Fixed Array header owning the data block */ \
\
- /* Fixed Array Data Block specific fields */ \
+ /* Fixed Array Data Block specific fields */ \
+ (d)->dblk_page_init_size /* Fixed array data block 'page init' bitmasks (can be 0 if no pages) */ \
)
/* Size of the Fixed Array data block on disk */
-#define H5FA_DBLOCK_SIZE(d) ( \
+#define H5FA_DBLOCK_SIZE(d) ( \
/* Data block prefix size */ \
H5FA_DBLOCK_PREFIX_SIZE(d) \
\
- /* Fixed Array Elements|Pages of Elements*/ \
+ /* Fixed Array Elements|Pages of Elements*/ \
+ ((d)->hdr->cparam.nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) \
- + ((d)->npages * H5FA_SIZEOF_CHKSUM) /* Checksum */ \
+ + ((d)->npages * H5FA_SIZEOF_CHKSUM) /* Checksum */ \
)
/* Size of the Fixed Array data block page on disk */
-#define H5FA_DBLK_PAGE_SIZE(d, nelmts) ( \
- /* Fixed Array Data Block Page */ \
+#define H5FA_DBLK_PAGE_SIZE(d, nelmts) ( \
+ /* Fixed Array Data Block Page */ \
+ (nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) /* Elements in data block page */ \
- + H5FA_SIZEOF_CHKSUM /* Checksum for each page */ \
+ + H5FA_SIZEOF_CHKSUM /* Checksum for each page */ \
)
/****************************/
@@ -127,7 +127,7 @@ typedef struct H5FA_hdr_t {
H5FA_create_t cparam; /* Creation parameters for Fixed Array */
/* Fixed Array data block information (stored in header) */
- haddr_t dblk_addr; /* Address of Fixed Array Data block */
+ haddr_t dblk_addr; /* Address of Fixed Array Data block */
/* Statistics for Fixed Array (stored in header) */
H5FA_stat_t stats; /* Statistcs for Fixed Array */
@@ -156,18 +156,18 @@ typedef struct H5FA_dblock_t {
void *elmts; /* Buffer for elements stored in data block */
/* Internal array information (not stored) */
- H5FA_hdr_t *hdr; /* Shared array header info */
+ H5FA_hdr_t *hdr; /* Shared array header info */
/* Computed/cached values (not stored) */
- haddr_t addr; /* Address of this data block on disk */
- hsize_t size; /* Size of data block on disk */
+ haddr_t addr; /* Address of this data block on disk */
+ hsize_t size; /* Size of data block on disk */
size_t npages; /* Nummber of pages in data block (zero if not paged) */
size_t last_page_nelmts; /* Nummber of elements in last page, if paged */
/* Fixed Array data block information (not stored) */
- size_t dblk_page_nelmts; /* # of elements per data block page */
- size_t dblk_page_size; /* Size of a data block page */
- size_t dblk_page_init_size; /* Size of 'page init' bitmask */
+ size_t dblk_page_nelmts; /* # of elements per data block page */
+ size_t dblk_page_size; /* Size of a data block page */
+ size_t dblk_page_init_size; /* Size of 'page init' bitmask */
} H5FA_dblock_t;
/* The fixed array data block page information */
@@ -179,18 +179,18 @@ typedef struct H5FA_dbk_page_t {
void *elmts; /* Buffer for elements stored in data block page */
/* Internal array information (not stored) */
- H5FA_hdr_t *hdr; /* Shared array header info */
+ H5FA_hdr_t *hdr; /* Shared array header info */
/* Computed/cached values (not stored) */
haddr_t addr; /* Address of this data block page on disk */
- size_t size; /* Size of data block page on disk */
+ size_t size; /* Size of data block page on disk */
size_t nelmts; /* Number of elements in data block page */
} H5FA_dblk_page_t;
/* Fixed array */
struct H5FA_t {
- H5FA_hdr_t *hdr; /* Pointer to internal fixed array header info */
- H5F_t *f; /* Pointer to file for fixed array */
+ H5FA_hdr_t *hdr; /* Pointer to internal fixed array header info */
+ H5F_t *f; /* Pointer to file for fixed array */
};
@@ -222,17 +222,11 @@ H5_DLLVAR const H5AC_class_t H5AC_FARRAY_DBLOCK[1];
/* H5FA data block page inherits cache-like properties from H5AC */
H5_DLLVAR const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1];
-/* The Fixed Array class for dataset chunks w/o filters*/
-H5_DLLVAR const H5FA_class_t H5FA_CLS_CHUNK[1];
-
-/* The Fixed Array class for dataset chunks w/ filters*/
-H5_DLLVAR const H5FA_class_t H5FA_CLS_FILT_CHUNK[1];
-
/* Internal fixed array testing class */
H5_DLLVAR const H5FA_class_t H5FA_CLS_TEST[1];
/* Array of fixed array client ID -> client class mappings */
-extern const H5FA_class_t *const H5FA_client_class_g[H5FA_NUM_CLS_ID];
+H5_DLLVAR const H5FA_class_t *const H5FA_client_class_g[H5FA_NUM_CLS_ID];
/******************************/
diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h
index f8a4619..9b054c9 100644
--- a/src/H5FAprivate.h
+++ b/src/H5FAprivate.h
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAprivate.h
+ * Created: H5FAprivate.h
*
- * Purpose: Private header for library accessible Fixed
+ * Purpose: Private header for library accessible Fixed
* Array routines.
*
*-------------------------------------------------------------------------
@@ -32,7 +32,7 @@
#endif /* NOT_YET */
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
+#include "H5Fprivate.h" /* File access */
/**************************/
@@ -51,7 +51,7 @@ typedef enum H5FA_cls_id_t {
/* Start real class IDs at 0 -QAK */
/* (keep these last) */
- H5FA_CLS_TEST_ID, /* Fixed array is for testing (do not use for actual data) */
+ H5FA_CLS_TEST_ID, /* Fixed array is for testing (do not use for actual data) */
H5FA_NUM_CLS_ID /* Number of Fixed Array class IDs (must be last) */
} H5FA_cls_id_t;
@@ -80,9 +80,9 @@ typedef struct H5FA_create_t {
const H5FA_class_t *cls; /* Class of Fixed Array to create */
uint8_t raw_elmt_size; /* Element size in file (in bytes) */
uint8_t max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in a data block page) -
- i.e. # of bits needed to store max. # of elements
- in a data block page */
- hsize_t nelmts; /* # of elements in array */
+ i.e. # of bits needed to store max. # of elements
+ in a data block page */
+ hsize_t nelmts; /* # of elements in array */
} H5FA_create_t;
/* Fixed array metadata statistics info */
@@ -106,6 +106,12 @@ typedef int (*H5FA_operator_t)(hsize_t idx, const void *_elmt, void *_udata);
/* Library-private Variables */
/*****************************/
+/* The Fixed Array class for dataset chunks w/o filters*/
+H5_DLLVAR const H5FA_class_t H5FA_CLS_CHUNK[1];
+
+/* The Fixed Array class for dataset chunks w/ filters*/
+H5_DLLVAR const H5FA_class_t H5FA_CLS_FILT_CHUNK[1];
+
/***************************************/
/* Library-private Function Prototypes */
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 94c0154..06448fe 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -34,11 +34,12 @@
/* Headers */
/***********/
+#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Errors */
#include "H5Fprivate.h" /* Files */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
#include "H5Opkg.h" /* Objects */
/*************/
@@ -47,11 +48,11 @@
/*-------------------------------------------------------------------------
- * Function: H5Oflush
+ * Function: H5Oflush
*
- * Purpose: Flushes all buffers associated with an object to disk.
+ * Purpose: Flushes all buffers associated with an object to disk.
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
* Programmer: Mike McGreevy
* May 19, 2010
@@ -134,11 +135,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Orefresh
+ * Function: H5Orefresh
*
- * Purpose: Refreshes all buffers associated with an object.
+ * Purpose: Refreshes all buffers associated with an object.
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
* Programmer: Mike McGreevy
* July 28, 2010
@@ -170,7 +171,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5O_refresh_metadata
*
- * Purpose: Internal routine that refreshes all buffers associated with
+ * Purpose: Internal routine that refreshes all buffers associated with
* an object.
*
* Return: Success: Non-negative