summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-07-30 22:53:18 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-07-30 22:53:18 (GMT)
commitddd5e4a6c329fbd6a791dde579020621d3e0e6c1 (patch)
tree08cb812561bbee2f6139f75a416739fc59a7ef67
parent36befb6bfe1f8f8dd3aa0f8e942fe5decadf5554 (diff)
downloadhdf5-ddd5e4a6c329fbd6a791dde579020621d3e0e6c1.zip
hdf5-ddd5e4a6c329fbd6a791dde579020621d3e0e6c1.tar.gz
hdf5-ddd5e4a6c329fbd6a791dde579020621d3e0e6c1.tar.bz2
Add format string macros PRI[doxX]HID for hid_t and use PRIdHID.
-rw-r--r--src/H5I.c2
-rw-r--r--src/H5Ipublic.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 11209d6..4215295 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2414,7 +2414,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
+ HDfprintf(stderr, " id = %" PRIdHID "\n", item->id);
HDfprintf(stderr, " count = %u\n", item->count);
HDfprintf(stderr, " obj = 0x%08p\n", item->obj_ptr);
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index 34a408f..c0334b0 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -53,6 +53,12 @@ typedef enum H5I_type_t {
/* Type of atoms to return to users */
typedef int64_t hid_t;
+
+#define PRIdHID PRId64
+#define PRIxHID PRIx64
+#define PRIXHID PRIX64
+#define PRIoHID PRIo64
+
#define H5_SIZEOF_HID_T H5_SIZEOF_INT64_T
/* An invalid object ID. This is also negative for error return. */