summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-07-30 22:32:03 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-07-30 22:32:03 (GMT)
commit36befb6bfe1f8f8dd3aa0f8e942fe5decadf5554 (patch)
treeaff30fd3dd5224b782dbed94225b8873536fcd11
parent69d51065d2926f829e4a5f31191ddb2f3364b82d (diff)
downloadhdf5-36befb6bfe1f8f8dd3aa0f8e942fe5decadf5554.zip
hdf5-36befb6bfe1f8f8dd3aa0f8e942fe5decadf5554.tar.gz
hdf5-36befb6bfe1f8f8dd3aa0f8e942fe5decadf5554.tar.bz2
Use HDva_copy() and introduce a bunch of compatbility format-string constants
for uppercase hexadecimal strings, `PRIX...`. Should fix the VS2010 errors that Allen mentioned: H5system.obj : error LNK2019: unresolved external symbol va_copy referenced in function HDvasprintf [C:\autotest\hdf5trunk-StdShar-code-vs10\build\ctest\hdfbld\src\hdf5-shared.vcxproj] 2 ..\..\..\hdfsrc\test\h5test.c(2103): error C2146: syntax error : missing ')' before identifier 'PRIX64' [C:\autotest\hdf5trunk-StdShar-code-vs10\build\ctest\hdfbld\test\hdf5_test-static.vcxproj]
-rw-r--r--src/H5public.h5
-rw-r--r--src/H5system.c2
-rw-r--r--src/H5win32defs.h7
3 files changed, 12 insertions, 2 deletions
diff --git a/src/H5public.h b/src/H5public.h
index 97bcb3c..a4b90b6 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -229,12 +229,12 @@ typedef long long ssize_t;
*/
typedef uint64_t hsize_t;
typedef int64_t hssize_t;
-#define PRIXHSIZE PRIX64
#define PRIdHSIZE PRId64
#define PRIiHSIZE PRIi64
#define PRIoHSIZE PRIo64
#define PRIuHSIZE PRIu64
#define PRIxHSIZE PRIx64
+#define PRIXHSIZE PRIX64
#define H5_SIZEOF_HSIZE_T H5_SIZEOF_UINT64_T
#define H5_SIZEOF_HSSIZE_T H5_SIZEOF_INT64_T
#define HSIZE_UNDEF UINT64_MAX
@@ -271,16 +271,19 @@ typedef int64_t hssize_t;
# define PRIoHADDR "o"
# define PRIuHADDR "u"
# define PRIxHADDR "x"
+# define PRIXHADDR "X"
#elif H5_SIZEOF_HADDR_T == H5_SIZEOF_LONG
# define PRIXHADDR "lX"
# define PRIoHADDR "lo"
# define PRIuHADDR "lu"
# define PRIxHADDR "lx"
+# define PRIXHADDR "lX"
#elif H5_SIZEOF_HADDR_T == H5_SIZEOF_LONG_LONG
# define PRIXHADDR H5_PRINTF_LL_WIDTH "X"
# define PRIoHADDR H5_PRINTF_LL_WIDTH "o"
# define PRIuHADDR H5_PRINTF_LL_WIDTH "u"
# define PRIxHADDR H5_PRINTF_LL_WIDTH "x"
+# define PRIXHADDR H5_PRINTF_LL_WIDTH "X"
#else
# error "nothing appropriate for H5_PRINTF_HADDR_FMT"
#endif
diff --git a/src/H5system.c b/src/H5system.c
index 310eb11..aa9c73d 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -87,7 +87,7 @@ HDvasprintf(char **bufp, const char *fmt, va_list _ap)
int ret;
va_list ap;
- va_copy(ap, _ap);
+ HDva_copy(ap, _ap);
ret = HDvsnprintf(buf, bufsz, fmt, ap);
va_end(ap);
if (ret >= 0 && (size_t)ret < bufsz) {
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 71162eb..cc70e94 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -31,33 +31,40 @@
# define PRIoPTR "llo"
# define PRIuPTR "llu"
# define PRIxPTR "llx"
+# define PRIXPTR "llX"
#else /* _WIN64 */
# define PRIdPTR "ld"
# define PRIoPTR "lo"
# define PRIuPTR "lu"
# define PRIxPTR "lx"
+# define PRIXPTR "lX"
#endif /* _WIN64 */
# define PRId8 "d"
# define PRIo8 "o"
# define PRIu8 "u"
# define PRIx8 "x"
+# define PRIX8 "X"
# define PRId16 "d"
# define PRIo16 "o"
# define PRIu16 "u"
# define PRIx16 "x"
+# define PRIX16 "X"
# define PRId32 "d"
# define PRIo32 "o"
# define PRIu32 "u"
# define PRIx32 "x"
+# define PRIX32 "X"
# define PRId64 "lld"
# define PRIo64 "llo"
# define PRIu64 "llu"
# define PRIx64 "llx"
+# define PRIX64 "llX"
# define PRIdMAX "lld"
# define PRIoMAX "llo"
# define PRIuMAX "llu"
# define PRIxMAX "llx"
+# define PRIXMAX "llX"
#endif
/*