summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 7550165..dc3147e 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -100,10 +100,10 @@
# define INT64ENCODE(p, n) { \
int64 _n = (n); \
- size_t _i; \
+ intn _i; \
uint8 *_p = (uint8*)(p); \
for (_i=0; _i<sizeof(int64); _i++, _n>>=8) { \
- *_p++ = (uint8)(_n & 0xff); \
+ *_p++ = _n & 0xff; \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = (n)<0 ? 0xff : 0; \
@@ -113,10 +113,10 @@
# define UINT64ENCODE(p, n) { \
uint64 _n = (n); \
- size_t _i; \
+ intn _i; \
uint8 *_p = (uint8*)(p); \
for (_i=0; _i<sizeof(uint64); _i++, _n>>=8) { \
- *_p++ = (uint8)(_n & 0xff); \
+ *_p++ = _n & 0xff; \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = 0; \
@@ -150,7 +150,7 @@
# define INT64DECODE(p, n) { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
- size_t _i; \
+ intn _i; \
n = 0; \
(p) += 8; \
for (_i=0; _i<sizeof(int64); _i++, n<<=8) { \
@@ -161,7 +161,7 @@
# define UINT64DECODE(p, n) { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
- size_t _i; \
+ intn _i; \
n = 0; \
(p) += 8; \
for (_i=0; _i<sizeof(uint64); _i++, n<<=8) { \
@@ -327,7 +327,11 @@ typedef struct H5F_low_t {
/* What types of low-level files are there? */
#ifndef H5F_LOW_DFLT
+# ifdef HAVE_PARALLEL
+# define H5F_LOW_DFLT H5F_LOW_MPIO /* when parallel, MPI-IO is default */
+# else
# define H5F_LOW_DFLT H5F_LOW_STDIO /* The default type */
+# endif
#endif
extern const H5F_low_class_t H5F_LOW_SEC2[]; /* Posix section 2 */
extern const H5F_low_class_t H5F_LOW_STDIO[]; /* Posix stdio */
@@ -399,12 +403,18 @@ typedef struct H5F_t {
break; \
}
+#ifdef NOT_YET
+#define H5F_encode_length(f,p,l) (H5F_SIZEOF_SIZE(f)==4 ? UINT32ENCODE(p,l) \
+ : H5F_SIZEOF_SIZE(f)==8 ? UINT64ENCODE(p,l) \
+ : H5F_SIZEOF_SIZE(f)==2 ? UINT16ENCODE(p,l) : H5FPencode_unusual_length(f,&(p),(uint8 *)&(l)))
+#else
#define H5F_encode_length(f,p,l) \
switch(H5F_SIZEOF_SIZE(f)) { \
case 4: UINT32ENCODE(p,l); break; \
case 8: UINT64ENCODE(p,l); break; \
case 2: UINT16ENCODE(p,l); break; \
}
+#endif
#define H5F_decode_length(f,p,l) \
switch(H5F_SIZEOF_SIZE(f)) { \