summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2022-04-22 13:52:01 (GMT)
committerGitHub <noreply@github.com>2022-04-22 13:52:01 (GMT)
commita6876a974556bf70a9d736f1ab4c21b2da8e1a88 (patch)
tree2d75eef87714381de3253c1bb545323ee98b05d4 /src/H5Tpkg.h
parentac9c21dd6fcccfd281c04ee14caf2e5c871191d7 (diff)
downloadhdf5-a6876a974556bf70a9d736f1ab4c21b2da8e1a88.zip
hdf5-a6876a974556bf70a9d736f1ab4c21b2da8e1a88.tar.gz
hdf5-a6876a974556bf70a9d736f1ab4c21b2da8e1a88.tar.bz2
Replace H5detect's build-time detection of C99 integer properties with a (#1400)
* Replace H5detect's build-time detection of C99 integer properties with a table-driven routine, `H5T__init_native_int()`, that is run at library initialization time.
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 4062cbe..72afbeb 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -388,26 +388,22 @@ typedef herr_t (*H5T_operator_t)(H5T_t *dt, void *op_data /*in,out*/);
H5_DLLVAR const unsigned H5O_dtype_ver_bounds[H5F_LIBVER_NBOUNDS];
/*
- * Alignment information for native types. A value of N indicates that the
- * data must be aligned on an address ADDR such that 0 == ADDR mod N. When
- * N=1 no alignment is required; N=0 implies that alignment constraints were
- * not calculated. These alignment info is only for H5Tget_native_type.
- * These values are used for structure alignment.
+ * Alignment constraints for HDF5 types. Accessing objects of these
+ * types with improper alignment invokes C undefined behavior, so the
+ * library lays out objects with correct alignment, always.
+ *
+ * A value of N indicates that the data must be aligned on an address
+ * ADDR such that 0 == ADDR mod N. When N=1 no alignment is required;
+ * N=0 implies that alignment constraints were not calculated. These
+ * values are used for structure alignment.
+ *
+ * This alignment info is only for H5Tget_native_type.
*/
-H5_DLLVAR size_t H5T_NATIVE_SCHAR_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_SHORT_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_INT_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_LONG_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_LLONG_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g;
-
-H5_DLLVAR size_t H5T_POINTER_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_HVL_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_HOBJREF_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_HDSETREGREF_COMP_ALIGN_g;
-H5_DLLVAR size_t H5T_REF_COMP_ALIGN_g;
+H5_DLLVAR size_t H5T_POINTER_ALIGN_g;
+H5_DLLVAR size_t H5T_HVL_ALIGN_g;
+H5_DLLVAR size_t H5T_HOBJREF_ALIGN_g;
+H5_DLLVAR size_t H5T_HDSETREGREF_ALIGN_g;
+H5_DLLVAR size_t H5T_REF_ALIGN_g;
/*
* Alignment information for native types. A value of N indicates that the
@@ -473,6 +469,7 @@ H5FL_EXTERN(H5T_shared_t);
/* Common functions */
H5_DLL herr_t H5T__init_native(void);
+H5_DLL herr_t H5T__init_native_internal(void);
H5_DLL H5T_t *H5T__create(H5T_class_t type, size_t size);
H5_DLL H5T_t *H5T__alloc(void);
H5_DLL herr_t H5T__free(H5T_t *dt);