summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-06-11 15:53:15 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-06-11 15:53:15 (GMT)
commit263bfa76ef70a96d195527b0063a929f2b57b78a (patch)
tree11760ef28ae04a24075cb71dfc0b78ed4d7fba05 /src
parentd6ba8a5095103b5799cd6aef4f291af275dca08d (diff)
downloadhdf5-263bfa76ef70a96d195527b0063a929f2b57b78a.zip
hdf5-263bfa76ef70a96d195527b0063a929f2b57b78a.tar.gz
hdf5-263bfa76ef70a96d195527b0063a929f2b57b78a.tar.bz2
[svn-r1328] Changes since 19990608
---------------------- ./configure.in ./configure [REGENERATED] ./src/H5T.c ./src/H5Tpkg.h ./src/H5Tpublic.h ./src/H5config.h.in [REGENERATED] ./src/H5detect.c ./src/H5private.h Added checks for the C9x integer types like int32_t, int_least32_t, and int_fast32_t and the unsigned versions. HDF5 defines H5T_NATIVE_* versions (all caps) to be the same as the type provided by the C library, otherwise it defines them as integers exactly the specified size. Hardware type conversion functions are used when the types match some C-language type (like `int').
Diffstat (limited to 'src')
-rw-r--r--src/H5T.c253
-rw-r--r--src/H5Tpkg.h29
-rw-r--r--src/H5Tpublic.h55
-rw-r--r--src/H5config.h.in51
-rw-r--r--src/H5detect.c117
-rw-r--r--src/H5private.h7
6 files changed, 475 insertions, 37 deletions
diff --git a/src/H5T.c b/src/H5T.c
index d29f968..17c9739 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -97,24 +97,82 @@ hid_t H5T_NATIVE_HSIZE_g = FAIL;
hid_t H5T_NATIVE_HSSIZE_g = FAIL;
hid_t H5T_NATIVE_HERR_g = FAIL;
hid_t H5T_NATIVE_HBOOL_g = FAIL;
+hid_t H5T_NATIVE_INT8_T_g = FAIL;
+hid_t H5T_NATIVE_UINT8_T_g = FAIL;
+hid_t H5T_NATIVE_INT_LEAST8_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_LEAST8_T_g = FAIL;
+hid_t H5T_NATIVE_INT_FAST8_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_FAST8_T_g = FAIL;
+hid_t H5T_NATIVE_INT16_T_g = FAIL;
+hid_t H5T_NATIVE_UINT16_T_g = FAIL;
+hid_t H5T_NATIVE_INT_LEAST16_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_LEAST16_T_g = FAIL;
+hid_t H5T_NATIVE_INT_FAST16_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_FAST16_T_g = FAIL;
+hid_t H5T_NATIVE_INT32_T_g = FAIL;
+hid_t H5T_NATIVE_UINT32_T_g = FAIL;
+hid_t H5T_NATIVE_INT_LEAST32_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_LEAST32_T_g = FAIL;
+hid_t H5T_NATIVE_INT_FAST32_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_FAST32_T_g = FAIL;
+hid_t H5T_NATIVE_INT64_T_g = FAIL;
+hid_t H5T_NATIVE_UINT64_T_g = FAIL;
+hid_t H5T_NATIVE_INT_LEAST64_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_LEAST64_T_g = FAIL;
+hid_t H5T_NATIVE_INT_FAST64_T_g = FAIL;
+hid_t H5T_NATIVE_UINT_FAST64_T_g = FAIL;
/*
* Alignment constraints for native types. These are initialized at run time
* in H5Tinit.c
*/
-size_t H5T_NATIVE_SCHAR_ALIGN_g = 0;
-size_t H5T_NATIVE_UCHAR_ALIGN_g = 0;
-size_t H5T_NATIVE_SHORT_ALIGN_g = 0;
-size_t H5T_NATIVE_USHORT_ALIGN_g = 0;
-size_t H5T_NATIVE_INT_ALIGN_g = 0;
-size_t H5T_NATIVE_UINT_ALIGN_g = 0;
-size_t H5T_NATIVE_LONG_ALIGN_g = 0;
-size_t H5T_NATIVE_ULONG_ALIGN_g = 0;
-size_t H5T_NATIVE_LLONG_ALIGN_g = 0;
-size_t H5T_NATIVE_ULLONG_ALIGN_g = 0;
-size_t H5T_NATIVE_FLOAT_ALIGN_g = 0;
-size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0;
-size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0;
+size_t H5T_NATIVE_SCHAR_ALIGN_g = 0;
+size_t H5T_NATIVE_UCHAR_ALIGN_g = 0;
+size_t H5T_NATIVE_SHORT_ALIGN_g = 0;
+size_t H5T_NATIVE_USHORT_ALIGN_g = 0;
+size_t H5T_NATIVE_INT_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_ALIGN_g = 0;
+size_t H5T_NATIVE_LONG_ALIGN_g = 0;
+size_t H5T_NATIVE_ULONG_ALIGN_g = 0;
+size_t H5T_NATIVE_LLONG_ALIGN_g = 0;
+size_t H5T_NATIVE_ULLONG_ALIGN_g = 0;
+size_t H5T_NATIVE_FLOAT_ALIGN_g = 0;
+size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0;
+size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0;
+
+/*
+ * Alignment constraints for C9x types. These are initialized at run time in
+ * H5Tinit.c if the types are provided by the system. Otherwise we set their
+ * values to 0 here (no alignment calculated).
+ */
+size_t H5T_NATIVE_INT8_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT8_T_ALIGN_g = 0;
+size_t H5T_NATIVE_INT_LEAST8_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_LEAST8_T_ALIGN_g = 0;
+size_t H5T_NATIVE_INT_FAST8_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_FAST8_T_ALIGN_g = 0;
+
+size_t H5T_NATIVE_INT16_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT16_T_ALIGN_g = 0;
+size_t H5T_NATIVE_INT_LEAST16_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_LEAST16_T_ALIGN_g= 0;
+size_t H5T_NATIVE_INT_FAST16_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_FAST16_T_ALIGN_g = 0;
+
+size_t H5T_NATIVE_INT32_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT32_T_ALIGN_g = 0;
+size_t H5T_NATIVE_INT_LEAST32_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_LEAST32_T_ALIGN_g= 0;
+size_t H5T_NATIVE_INT_FAST32_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_FAST32_T_ALIGN_g = 0;
+
+size_t H5T_NATIVE_INT64_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT64_T_ALIGN_g = 0;
+size_t H5T_NATIVE_INT_LEAST64_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_LEAST64_T_ALIGN_g= 0;
+size_t H5T_NATIVE_INT_FAST64_T_ALIGN_g = 0;
+size_t H5T_NATIVE_UINT_FAST64_T_ALIGN_g = 0;
+
/*
* The path database. Each path has a source and destination data type pair
@@ -203,6 +261,164 @@ H5T_init_interface(void)
}
/*------------------------------------------------------------
+ * Defaults for C9x types
+ *------------------------------------------------------------
+ */
+
+ /* int8 */
+ if (H5T_NATIVE_INT8_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT8_T_g = H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 1;
+ dt->u.atomic.prec = 8;
+ }
+ if (H5T_NATIVE_UINT8_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT8_T_g = H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 1;
+ dt->u.atomic.prec = 8;
+ }
+ if (H5T_NATIVE_INT_LEAST8_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_LEAST8_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 1;
+ dt->u.atomic.prec = 8;
+ }
+ if (H5T_NATIVE_UINT_LEAST8_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT_LEAST8_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 1;
+ dt->u.atomic.prec = 8;
+ }
+ if (H5T_NATIVE_INT_FAST8_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_FAST8_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 1;
+ dt->u.atomic.prec = 8;
+ }
+ if (H5T_NATIVE_UINT_FAST8_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT_FAST8_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 1;
+ dt->u.atomic.prec = 8;
+ }
+
+ /* int16 */
+ if (H5T_NATIVE_INT16_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT16_T_g = H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 2;
+ dt->u.atomic.prec = 16;
+ }
+ if (H5T_NATIVE_UINT16_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT16_T_g = H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 2;
+ dt->u.atomic.prec = 16;
+ }
+ if (H5T_NATIVE_INT_LEAST16_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_LEAST16_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 2;
+ dt->u.atomic.prec = 16;
+ }
+ if (H5T_NATIVE_UINT_LEAST16_T_g<0) {
+ dt=H5I_object(H5T_NATIVE_UINT_LEAST16_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 2;
+ dt->u.atomic.prec = 16;
+ }
+ if (H5T_NATIVE_INT_FAST16_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_FAST16_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 2;
+ dt->u.atomic.prec = 16;
+ }
+ if (H5T_NATIVE_UINT_FAST16_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT_FAST16_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 2;
+ dt->u.atomic.prec = 16;
+ }
+
+ /* int32 */
+ if (H5T_NATIVE_INT32_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT32_T_g = H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 4;
+ dt->u.atomic.prec = 32;
+ }
+ if (H5T_NATIVE_UINT32_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT32_T_g = H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 4;
+ dt->u.atomic.prec = 32;
+ }
+ if (H5T_NATIVE_INT_LEAST32_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_LEAST32_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 4;
+ dt->u.atomic.prec = 32;
+ }
+ if (H5T_NATIVE_UINT_LEAST32_T_g<0) {
+ dt=H5I_object(H5T_NATIVE_UINT_LEAST32_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 4;
+ dt->u.atomic.prec = 32;
+ }
+ if (H5T_NATIVE_INT_FAST32_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_FAST32_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 4;
+ dt->u.atomic.prec = 32;
+ }
+ if (H5T_NATIVE_UINT_FAST32_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT_FAST32_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 4;
+ dt->u.atomic.prec = 32;
+ }
+
+ /* int64 */
+ if (H5T_NATIVE_INT64_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT64_T_g = H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 8;
+ dt->u.atomic.prec = 64;
+ }
+ if (H5T_NATIVE_UINT64_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT64_T_g = H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 8;
+ dt->u.atomic.prec = 64;
+ }
+ if (H5T_NATIVE_INT_LEAST64_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_LEAST64_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 8;
+ dt->u.atomic.prec = 64;
+ }
+ if (H5T_NATIVE_UINT_LEAST64_T_g<0) {
+ dt=H5I_object(H5T_NATIVE_UINT_LEAST64_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 8;
+ dt->u.atomic.prec = 64;
+ }
+ if (H5T_NATIVE_INT_FAST64_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_INT_FAST64_T_g=H5Tcopy(H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 8;
+ dt->u.atomic.prec = 64;
+ }
+ if (H5T_NATIVE_UINT_FAST64_T_g<0) {
+ dt = H5I_object(H5T_NATIVE_UINT_FAST64_T_g=H5Tcopy(H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = 8;
+ dt->u.atomic.prec = 64;
+ }
+
+
+ /*------------------------------------------------------------
* Native types
*------------------------------------------------------------
*/
@@ -661,6 +877,7 @@ H5T_init_interface(void)
* Pointer types
*------------------------------------------------------------
*/
+
/* Object pointer (i.e. object header address in file) */
if (NULL==(dt = H5MM_calloc(sizeof(H5T_t)))) {
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
@@ -680,6 +897,7 @@ H5T_init_interface(void)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to initialize H5T layer");
}
+
/* Dataset Region pointer (i.e. selection inside a dataset) */
if (NULL==(dt = H5MM_calloc(sizeof(H5T_t)))) {
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
@@ -700,6 +918,10 @@ H5T_init_interface(void)
"unable to initialize H5T layer");
}
+ /*
+ * Register conversion functions beginning with the most general and
+ * ending with the most specific.
+ */
fixedpt = H5T_NATIVE_INT;
floatpt = H5T_NATIVE_FLOAT;
string = H5T_C_S1;
@@ -708,10 +930,7 @@ H5T_init_interface(void)
enum_type = H5Tcreate(H5T_ENUM, 1);
vlen_type = H5Tvlen_create(H5T_NATIVE_INT);
status = 0;
- /*
- * Register conversion functions beginning with the most general and
- * ending with the most specific.
- */
+
status |= H5Tregister(H5T_PERS_SOFT, "i_i",
fixedpt, fixedpt,
H5T_conv_i_i);
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 5a8942d..3ceeeab 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -178,6 +178,35 @@ __DLLVAR__ size_t H5T_NATIVE_FLOAT_ALIGN_g;
__DLLVAR__ size_t H5T_NATIVE_DOUBLE_ALIGN_g;
__DLLVAR__ size_t H5T_NATIVE_LDOUBLE_ALIGN_g;
+/* C9x alignment constraints */
+__DLLVAR__ size_t H5T_NATIVE_INT8_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT8_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_LEAST8_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_LEAST8_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_FAST8_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_FAST8_T_ALIGN_g;
+
+__DLLVAR__ size_t H5T_NATIVE_INT16_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT16_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_LEAST16_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_LEAST16_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_FAST16_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_FAST16_T_ALIGN_g;
+
+__DLLVAR__ size_t H5T_NATIVE_INT32_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT32_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_LEAST32_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_LEAST32_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_FAST32_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_FAST32_T_ALIGN_g;
+
+__DLLVAR__ size_t H5T_NATIVE_INT64_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT64_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_LEAST64_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_LEAST64_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_INT_FAST64_T_ALIGN_g;
+__DLLVAR__ size_t H5T_NATIVE_UINT_FAST64_T_ALIGN_g;
+
/* Conversion functions */
__DLL__ herr_t H5T_conv_noop(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index db5e2a6..e208351 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -382,7 +382,60 @@ __DLLVAR__ hid_t H5T_NATIVE_HSIZE_g;
__DLLVAR__ hid_t H5T_NATIVE_HSSIZE_g;
__DLLVAR__ hid_t H5T_NATIVE_HERR_g;
__DLLVAR__ hid_t H5T_NATIVE_HBOOL_g;
-
+
+/* C9x integer types */
+#define H5T_NATIVE_INT8_T (H5open(), H5T_NATIVE_INT8_T_g)
+#define H5T_NATIVE_UINT8_T (H5open(), H5T_NATIVE_UINT8_T_g)
+#define H5T_NATIVE_INT_LEAST8_T (H5open(), H5T_NATIVE_INT_LEAST8_T_g)
+#define H5T_NATIVE_UINT_LEAST8_T (H5open(), H5T_NATIVE_UINT_LEAST8_T_g)
+#define H5T_NATIVE_INT_FAST8_T (H5open(), H5T_NATIVE_INT_FAST8_T_g)
+#define H5T_NATIVE_UINT_FAST8_T (H5open(), H5T_NATIVE_UINT_FAST8_T_g)
+__DLLVAR__ hid_t H5T_NATIVE_INT8_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT8_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_LEAST8_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_LEAST8_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_FAST8_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_FAST8_T_g;
+
+#define H5T_NATIVE_INT16_T (H5open(), H5T_NATIVE_INT16_T_g)
+#define H5T_NATIVE_UINT16_T (H5open(), H5T_NATIVE_UINT16_T_g)
+#define H5T_NATIVE_INT_LEAST16_T (H5open(), H5T_NATIVE_INT_LEAST16_T_g)
+#define H5T_NATIVE_UINT_LEAST16_T (H5open(), H5T_NATIVE_UINT_LEAST16_T_g)
+#define H5T_NATIVE_INT_FAST16_T (H5open(), H5T_NATIVE_INT_FAST16_T_g)
+#define H5T_NATIVE_UINT_FAST16_T (H5open(), H5T_NATIVE_UINT_FAST16_T_g)
+__DLLVAR__ hid_t H5T_NATIVE_INT16_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT16_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_LEAST16_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_LEAST16_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_FAST16_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_FAST16_T_g;
+
+#define H5T_NATIVE_INT32_T (H5open(), H5T_NATIVE_INT32_T_g)
+#define H5T_NATIVE_UINT32_T (H5open(), H5T_NATIVE_UINT32_T_g)
+#define H5T_NATIVE_INT_LEAST32_T (H5open(), H5T_NATIVE_INT_LEAST32_T_g)
+#define H5T_NATIVE_UINT_LEAST32_T (H5open(), H5T_NATIVE_UINT_LEAST32_T_g)
+#define H5T_NATIVE_INT_FAST32_T (H5open(), H5T_NATIVE_INT_FAST32_T_g)
+#define H5T_NATIVE_UINT_FAST32_T (H5open(), H5T_NATIVE_UINT_FAST32_T_g)
+__DLLVAR__ hid_t H5T_NATIVE_INT32_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT32_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_LEAST32_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_LEAST32_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_FAST32_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_FAST32_T_g;
+
+#define H5T_NATIVE_INT64_T (H5open(), H5T_NATIVE_INT64_T_g)
+#define H5T_NATIVE_UINT64_T (H5open(), H5T_NATIVE_UINT64_T_g)
+#define H5T_NATIVE_INT_LEAST64_T (H5open(), H5T_NATIVE_INT_LEAST64_T_g)
+#define H5T_NATIVE_UINT_LEAST64_T (H5open(), H5T_NATIVE_UINT_LEAST64_T_g)
+#define H5T_NATIVE_INT_FAST64_T (H5open(), H5T_NATIVE_INT_FAST64_T_g)
+#define H5T_NATIVE_UINT_FAST64_T (H5open(), H5T_NATIVE_UINT_FAST64_T_g)
+__DLLVAR__ hid_t H5T_NATIVE_INT64_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT64_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_LEAST64_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_LEAST64_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_INT_FAST64_T_g;
+__DLLVAR__ hid_t H5T_NATIVE_UINT_FAST64_T_g;
+
/* Operations defined on all data types */
__DLL__ hid_t H5Topen(hid_t loc_id, const char *name);
__DLL__ hid_t H5Tcreate(H5T_class_t type, size_t size);
diff --git a/src/H5config.h.in b/src/H5config.h.in
index cdb3fb2..0cddcf1 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -101,6 +101,30 @@
/* The number of bytes in a int8_t. */
#undef SIZEOF_INT8_T
+/* The number of bytes in a int_fast16_t. */
+#undef SIZEOF_INT_FAST16_T
+
+/* The number of bytes in a int_fast32_t. */
+#undef SIZEOF_INT_FAST32_T
+
+/* The number of bytes in a int_fast64_t. */
+#undef SIZEOF_INT_FAST64_T
+
+/* The number of bytes in a int_fast8_t. */
+#undef SIZEOF_INT_FAST8_T
+
+/* The number of bytes in a int_least16_t. */
+#undef SIZEOF_INT_LEAST16_T
+
+/* The number of bytes in a int_least32_t. */
+#undef SIZEOF_INT_LEAST32_T
+
+/* The number of bytes in a int_least64_t. */
+#undef SIZEOF_INT_LEAST64_T
+
+/* The number of bytes in a int_least8_t. */
+#undef SIZEOF_INT_LEAST8_T
+
/* The number of bytes in a long. */
#undef SIZEOF_LONG
@@ -131,6 +155,30 @@
/* The number of bytes in a uint8_t. */
#undef SIZEOF_UINT8_T
+/* The number of bytes in a uint_fast16_t. */
+#undef SIZEOF_UINT_FAST16_T
+
+/* The number of bytes in a uint_fast32_t. */
+#undef SIZEOF_UINT_FAST32_T
+
+/* The number of bytes in a uint_fast64_t. */
+#undef SIZEOF_UINT_FAST64_T
+
+/* The number of bytes in a uint_fast8_t. */
+#undef SIZEOF_UINT_FAST8_T
+
+/* The number of bytes in a uint_least16_t. */
+#undef SIZEOF_UINT_LEAST16_T
+
+/* The number of bytes in a uint_least32_t. */
+#undef SIZEOF_UINT_LEAST32_T
+
+/* The number of bytes in a uint_least64_t. */
+#undef SIZEOF_UINT_LEAST64_T
+
+/* The number of bytes in a uint_least8_t. */
+#undef SIZEOF_UINT_LEAST8_T
+
/* Define if you have the BSDgettimeofday function. */
#undef HAVE_BSDGETTIMEOFDAY
@@ -212,6 +260,9 @@
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
+/* Define if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
diff --git a/src/H5detect.c b/src/H5detect.c
index 6943972..1d07df8 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -32,7 +32,7 @@ static const char *FileHeader = "\n\
#undef NDEBUG
#include <H5private.h>
-#define MAXDETECT 16
+#define MAXDETECT 64
/*
* This structure holds information about a type that
* was detected.
@@ -994,39 +994,118 @@ main(void)
print_header();
- DETECT_I(signed char, SCHAR, d[nd]); nd++;
- DETECT_I(unsigned char, UCHAR, d[nd]); nd++;
- DETECT_I(short, SHORT, d[nd]); nd++;
- DETECT_I(unsigned short, USHORT, d[nd]); nd++;
- DETECT_I(int, INT, d[nd]); nd++;
- DETECT_I(unsigned int, UINT, d[nd]); nd++;
- DETECT_I(long, LONG, d[nd]); nd++;
- DETECT_I(unsigned long, ULONG, d[nd]); nd++;
+ /* C89 integer types */
+ DETECT_I(signed char, SCHAR, d[nd]); nd++;
+ DETECT_I(unsigned char, UCHAR, d[nd]); nd++;
+ DETECT_I(short, SHORT, d[nd]); nd++;
+ DETECT_I(unsigned short, USHORT, d[nd]); nd++;
+ DETECT_I(int, INT, d[nd]); nd++;
+ DETECT_I(unsigned int, UINT, d[nd]); nd++;
+ DETECT_I(long, LONG, d[nd]); nd++;
+ DETECT_I(unsigned long, ULONG, d[nd]); nd++;
+ /*
+ * C9x integer types.
+ */
+#if SIZEOF_INT8_T>0
+ DETECT_I(int8_t, INT8_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT8_T>0
+ DETECT_I(uint8_t, UINT8_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_LEAST8_T>0
+ DETECT_I(int_least8_t, INT_LEAST8_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_LEAST8_T>0
+ DETECT_I(uint_least8_t, UINT_LEAST8_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_FAST8_T>0
+ DETECT_I(int_fast8_t, INT_FAST8_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_FAST8_T>0
+ DETECT_I(uint_fast8_t, UINT_FAST8_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT16_T>0
+ DETECT_I(int16_t, INT16_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT16_T>0
+ DETECT_I(uint16_t, UINT16_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_LEAST16_T>0
+ DETECT_I(int_least16_t, INT_LEAST16_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_LEAST16_T>0
+ DETECT_I(uint_least16_t, UINT_LEAST16_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_FAST16_T>0
+ DETECT_I(int_fast16_t, INT_FAST16_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_FAST16_T>0
+ DETECT_I(uint_fast16_t, UINT_FAST16_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT32_T>0
+ DETECT_I(int32_t, INT32_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT32_T>0
+ DETECT_I(uint32_t, UINT32_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_LEAST32_T>0
+ DETECT_I(int_least32_t, INT_LEAST32_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_LEAST32_T>0
+ DETECT_I(uint_least32_t, UINT_LEAST32_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_FAST32_T>0
+ DETECT_I(int_fast32_t, INT_FAST32_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_FAST32_T>0
+ DETECT_I(uint_fast32_t, UINT_FAST32_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT64_T>0
+ DETECT_I(int64_t, INT64_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT64_T>0
+ DETECT_I(uint64_t, UINT64_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_LEAST64_T>0
+ DETECT_I(int_least64_t, INT_LEAST64_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_LEAST64_T>0
+ DETECT_I(uint_least64_t, UINT_LEAST64_T, d[nd]); nd++;
+#endif
+#if SIZEOF_INT_FAST64_T>0
+ DETECT_I(int_fast64_t, INT_FAST64_T, d[nd]); nd++;
+#endif
+#if SIZEOF_UINT_FAST64_T>0
+ DETECT_I(uint_fast64_t, UINT_FAST64_T, d[nd]); nd++;
+#endif
+
#if SIZEOF_LONG_LONG>0
- DETECT_I(long_long, LLONG, d[nd]); nd++;
- DETECT_I(unsigned long_long, ULLONG, d[nd]); nd++;
+ DETECT_I(long_long, LLONG, d[nd]); nd++;
+ DETECT_I(unsigned long_long, ULLONG, d[nd]); nd++;
#else
/*
* This architecture doesn't support an integer type larger than `long'
- * so we'll just make H5T_NATIVE_LLONG the same as H5T_NATIVE_LONG.
+ * so we'll just make H5T_NATIVE_LLONG the same as H5T_NATIVE_LONG since
+ * `long long' is probably equivalent to `long' here anyway.
*/
- DETECT_I(long, LLONG, d[nd]); nd++;
- DETECT_I(unsigned long, ULLONG, d[nd]); nd++;
+ DETECT_I(long, LLONG, d[nd]); nd++;
+ DETECT_I(unsigned long, ULLONG, d[nd]); nd++;
#endif
- DETECT_F(float, FLOAT, d[nd]); nd++;
- DETECT_F(double, DOUBLE, d[nd]); nd++;
+ DETECT_F(float, FLOAT, d[nd]); nd++;
+ DETECT_F(double, DOUBLE, d[nd]); nd++;
#if SIZEOF_DOUBLE == SIZEOF_LONG_DOUBLE
/*
* If sizeof(double)==sizeof(long double) then assume that `long double'
* isn't supported and use `double' instead. This suppresses warnings on
- * some systems.
+ * some systems and `long double' is probably the same as `double' here
+ * anyway.
*/
- DETECT_F(double, LDOUBLE, d[nd]); nd++;
+ DETECT_F(double, LDOUBLE, d[nd]); nd++;
#else
- DETECT_F(long double, LDOUBLE, d[nd]); nd++;
+ DETECT_F(long double, LDOUBLE, d[nd]); nd++;
#endif
print_results (nd, d);
diff --git a/src/H5private.h b/src/H5private.h
index 6c80e2b..5d973c5 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -46,6 +46,13 @@
#endif
/*
+ * C9x integer types
+ */
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+/*
* The `struct stat' data type for stat() and fstat(). This is a Posix file
* but often apears on non-Posix systems also. The `struct stat' is required
* for hdf5 to compile, although only a few fields are actually used.