summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-04-26 22:36:58 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-04-26 22:36:58 (GMT)
commit191eb62249a27c22dab956d12bc223f37463910c (patch)
treeef77df8896cc1a1dcb4da334b6578bcd265363b4
parentbd4dbbe5183f48e96f0f4c2be88c00b1f9dacf59 (diff)
downloadhdf5-191eb62249a27c22dab956d12bc223f37463910c.zip
hdf5-191eb62249a27c22dab956d12bc223f37463910c.tar.gz
hdf5-191eb62249a27c22dab956d12bc223f37463910c.tar.bz2
[svn-r5274] Purpose:
Migrate from configure macros of XYZ_ABC to H5_XYZ_ABC Description: configure generates many macros definitions on the fly and were stored in src/H5config.h which is included by H5public.h. But other software that uses hdf5 may also run their own configure. There can be a clash in macro name space. We decided awhile ago to prepend all generated macros with "H5_" to avoid conflicts. The process has started and this commit completes it (at least attempt to). Solution: Many macros symbols (e.g. SIZEOF_xxx and HAVE_xxx were changed to H5_SIZEOF_xxx and H5_HAVE_xxx). Then H5private.h no longer includes H5config.h. This cuts H5config.h away from HDF5 source code. Pending issues: The macro definitions (more like redefinitions) of potential keywords: const, off_t, size_t, and inline are not totally solved yet. The module of fortran and pablo are to be resolved in a different commit. Platforms tested: eirene (parallel), arabica (solaris 7 --enable-fortran, --enable-cxx)
-rw-r--r--src/H5.c14
-rw-r--r--src/H5F.c2
-rw-r--r--src/H5Fpkg.h2
-rw-r--r--src/H5G.c2
-rw-r--r--src/H5P.c4
-rw-r--r--src/H5Ppublic.h2
-rw-r--r--src/H5detect.c52
-rw-r--r--src/H5private.h145
-rw-r--r--test/big.c2
-rw-r--r--test/dtypes.c112
-rw-r--r--test/h5test.h2
-rw-r--r--test/tconfig.c84
-rw-r--r--tools/h5dump/h5dump.c8
-rw-r--r--tools/h5ls/h5ls.c4
-rw-r--r--tools/lib/h5tools_str.c4
15 files changed, 215 insertions, 224 deletions
diff --git a/src/H5.c b/src/H5.c
index f835f0b..376cda2 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -851,7 +851,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
} else if (sizeof(hsize_t)==sizeof(long)) {
HDstrcpy (modifier, "l");
} else {
- HDstrcpy (modifier, PRINTF_LL_WIDTH);
+ HDstrcpy (modifier, H5_PRINTF_LL_WIDTH);
}
break;
case 'Z':
@@ -860,7 +860,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
} else if (sizeof(size_t)==sizeof(long)) {
HDstrcpy (modifier, "l");
} else {
- HDstrcpy (modifier, PRINTF_LL_WIDTH);
+ HDstrcpy (modifier, H5_PRINTF_LL_WIDTH);
}
break;
default:
@@ -963,7 +963,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
* Some compilers complain when `long double' and
* `double' are the same thing.
*/
-#if SIZEOF_LONG_DOUBLE != SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
long double x = va_arg (ap, long double);
n = fprintf (stream, template, x);
#else
@@ -984,12 +984,12 @@ HDfprintf (FILE *stream, const char *fmt, ...)
if (fwidth>0) {
sprintf(template+HDstrlen(template), "%d", fwidth);
}
- if (sizeof(x)==SIZEOF_INT) {
+ if (sizeof(x)==H5_SIZEOF_INT) {
HDstrcat(template, "d");
- } else if (sizeof(x)==SIZEOF_LONG) {
+ } else if (sizeof(x)==H5_SIZEOF_LONG) {
HDstrcat(template, "ld");
- } else if (sizeof(x)==SIZEOF_LONG_LONG) {
- HDstrcat(template, PRINTF_LL_WIDTH);
+ } else if (sizeof(x)==H5_SIZEOF_LONG_LONG) {
+ HDstrcat(template, H5_PRINTF_LL_WIDTH);
HDstrcat(template, "d");
}
n = fprintf(stream, template, x);
diff --git a/src/H5F.c b/src/H5F.c
index a938dc5..ae2a2e5 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2791,7 +2791,7 @@ H5F_addr_pack(H5F_t UNUSED *f, haddr_t *addr_p/*out*/,
assert(addr_p);
*addr_p = objno[0];
-#if SIZEOF_LONG<SIZEOF_UINT64_T
+#if H5_SIZEOF_LONG<H5_SIZEOF_UINT64_T
*addr_p |= ((uint64_t)objno[1]) << (8*sizeof(long));
#endif
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 1101a46..93363cb 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -55,7 +55,7 @@
* Macros that check for overflows. These are somewhat dangerous to fiddle
* with.
*/
-#if (SIZEOF_SIZE_T >= SIZEOF_OFF_T)
+#if (H5_SIZEOF_SIZE_T >= H5_SIZEOF_OFF_T)
# define H5F_OVERFLOW_SIZET2OFFT(X) \
((size_t)(X)>=(size_t)((size_t)1<<(8*sizeof(off_t)-1)))
#else
diff --git a/src/H5G.c b/src/H5G.c
index bd2722b..2cd19b8 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -2088,7 +2088,7 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
} else {
/* Some other type of object */
statbuf->objno[0] = (unsigned long)(obj_ent.header);
-#if SIZEOF_UINT64_T>SIZEOF_LONG
+#if H5_SIZEOF_UINT64_T>H5_SIZEOF_LONG
statbuf->objno[1] = (unsigned long)(obj_ent.header >>
8*sizeof(long));
#else
diff --git a/src/H5P.c b/src/H5P.c
index 44fad32..d26dff6 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -2427,7 +2427,7 @@ H5Pget_family(hid_t plist_id, hsize_t *memb_size/*out*/,
}
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
* Function: H5Pset_mpi
*
@@ -2660,7 +2660,7 @@ H5Pget_xfer(hid_t plist_id, H5D_transfer_t *data_xfer_mode)
FUNC_LEAVE (SUCCEED);
}
-#endif /* HAVE_PARALLEL */
+#endif /* H5_HAVE_PARALLEL */
#endif /* WANT_H5_V1_2_COMPAT */
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 7af289c..64a7eb8 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -171,7 +171,7 @@ __DLL__ herr_t H5Pget_split(hid_t plist_id, size_t meta_ext_size, char *meta_ext
__DLL__ herr_t H5Pset_family(hid_t plist_id, hsize_t memb_size, hid_t memb_plist_id);
__DLL__ herr_t H5Pget_family(hid_t plist_id, hsize_t *memb_size/*out*/,
hid_t *memb_plist_id/*out*/);
-#if defined(HAVE_PARALLEL) || defined(H5_HAVE_PARALLEL)
+#if defined(H5_HAVE_PARALLEL)
__DLL__ herr_t H5Pset_mpi(hid_t plist_id, MPI_Comm comm, MPI_Info info);
__DLL__ herr_t H5Pget_mpi(hid_t plist_id, MPI_Comm *comm, MPI_Info *info);
__DLL__ herr_t H5Pset_xfer(hid_t plist_id, H5D_transfer_t data_xfer_mode);
diff --git a/src/H5detect.c b/src/H5detect.c
index 36e3c73..c8d78ff 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -1018,80 +1018,80 @@ main(void)
/*
* C9x integer types.
*/
-#if SIZEOF_INT8_T>0
+#if H5_SIZEOF_INT8_T>0
DETECT_I(int8_t, INT8, d[nd]); nd++;
#endif
-#if SIZEOF_UINT8_T>0
+#if H5_SIZEOF_UINT8_T>0
DETECT_I(uint8_t, UINT8, d[nd]); nd++;
#endif
-#if SIZEOF_INT_LEAST8_T>0
+#if H5_SIZEOF_INT_LEAST8_T>0
DETECT_I(int_least8_t, INT_LEAST8, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_LEAST8_T>0
+#if H5_SIZEOF_UINT_LEAST8_T>0
DETECT_I(uint_least8_t, UINT_LEAST8, d[nd]); nd++;
#endif
-#if SIZEOF_INT_FAST8_T>0
+#if H5_SIZEOF_INT_FAST8_T>0
DETECT_I(int_fast8_t, INT_FAST8, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_FAST8_T>0
+#if H5_SIZEOF_UINT_FAST8_T>0
DETECT_I(uint_fast8_t, UINT_FAST8, d[nd]); nd++;
#endif
-#if SIZEOF_INT16_T>0
+#if H5_SIZEOF_INT16_T>0
DETECT_I(int16_t, INT16, d[nd]); nd++;
#endif
-#if SIZEOF_UINT16_T>0
+#if H5_SIZEOF_UINT16_T>0
DETECT_I(uint16_t, UINT16, d[nd]); nd++;
#endif
-#if SIZEOF_INT_LEAST16_T>0
+#if H5_SIZEOF_INT_LEAST16_T>0
DETECT_I(int_least16_t, INT_LEAST16, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_LEAST16_T>0
+#if H5_SIZEOF_UINT_LEAST16_T>0
DETECT_I(uint_least16_t, UINT_LEAST16, d[nd]); nd++;
#endif
-#if SIZEOF_INT_FAST16_T>0
+#if H5_SIZEOF_INT_FAST16_T>0
DETECT_I(int_fast16_t, INT_FAST16, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_FAST16_T>0
+#if H5_SIZEOF_UINT_FAST16_T>0
DETECT_I(uint_fast16_t, UINT_FAST16, d[nd]); nd++;
#endif
-#if SIZEOF_INT32_T>0
+#if H5_SIZEOF_INT32_T>0
DETECT_I(int32_t, INT32, d[nd]); nd++;
#endif
-#if SIZEOF_UINT32_T>0
+#if H5_SIZEOF_UINT32_T>0
DETECT_I(uint32_t, UINT32, d[nd]); nd++;
#endif
-#if SIZEOF_INT_LEAST32_T>0
+#if H5_SIZEOF_INT_LEAST32_T>0
DETECT_I(int_least32_t, INT_LEAST32, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_LEAST32_T>0
+#if H5_SIZEOF_UINT_LEAST32_T>0
DETECT_I(uint_least32_t, UINT_LEAST32, d[nd]); nd++;
#endif
-#if SIZEOF_INT_FAST32_T>0
+#if H5_SIZEOF_INT_FAST32_T>0
DETECT_I(int_fast32_t, INT_FAST32, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_FAST32_T>0
+#if H5_SIZEOF_UINT_FAST32_T>0
DETECT_I(uint_fast32_t, UINT_FAST32, d[nd]); nd++;
#endif
-#if SIZEOF_INT64_T>0
+#if H5_SIZEOF_INT64_T>0
DETECT_I(int64_t, INT64, d[nd]); nd++;
#endif
-#if SIZEOF_UINT64_T>0
+#if H5_SIZEOF_UINT64_T>0
DETECT_I(uint64_t, UINT64, d[nd]); nd++;
#endif
-#if SIZEOF_INT_LEAST64_T>0
+#if H5_SIZEOF_INT_LEAST64_T>0
DETECT_I(int_least64_t, INT_LEAST64, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_LEAST64_T>0
+#if H5_SIZEOF_UINT_LEAST64_T>0
DETECT_I(uint_least64_t, UINT_LEAST64, d[nd]); nd++;
#endif
-#if SIZEOF_INT_FAST64_T>0
+#if H5_SIZEOF_INT_FAST64_T>0
DETECT_I(int_fast64_t, INT_FAST64, d[nd]); nd++;
#endif
-#if SIZEOF_UINT_FAST64_T>0
+#if H5_SIZEOF_UINT_FAST64_T>0
DETECT_I(uint_fast64_t, UINT_FAST64, d[nd]); nd++;
#endif
-#if SIZEOF_LONG_LONG>0
+#if H5_SIZEOF_LONG_LONG>0
DETECT_I(long_long, LLONG, d[nd]); nd++;
DETECT_I(unsigned long_long, ULLONG, d[nd]); nd++;
#else
@@ -1107,7 +1107,7 @@ main(void)
DETECT_F(float, FLOAT, d[nd]); nd++;
DETECT_F(double, DOUBLE, d[nd]); nd++;
-#if SIZEOF_DOUBLE == SIZEOF_LONG_DOUBLE
+#if H5_SIZEOF_DOUBLE == H5_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
diff --git a/src/H5private.h b/src/H5private.h
index 742f762..15996c6 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -15,15 +15,6 @@
#define _H5private_H
#include "H5public.h" /* Include Public Definitions */
-/*
- * Since H5config.h is a generated header file, it is messy to try
- * to put a #ifndef _H5config_H ... #endif guard in it.
- * HDF5 has set an internal rule that it is being included here.
- * Source files should NOT include H5config.h directly but include
- * it via H5private.h. The #ifndef _H5private_H guard above would
- * prevent repeated include.
- */
-#include "H5config.h" /* Include all configuration info */
/* include the pthread library */
#ifdef H5_HAVE_THREADSAFE
@@ -277,16 +268,16 @@ Move H5_inline into windows version of H5pubconf.h; avoid duplicating warnings.
* supported by the compiler, usually 64 bits. It must be legal to qualify
* `long_long' with `unsigned'.
*/
-#if SIZEOF_LONG_LONG>0
+#if H5_SIZEOF_LONG_LONG>0
# define long_long long long
-#elif SIZEOF___INT64>0
+#elif H5_SIZEOF___INT64>0
# define long_long __int64 /*Win32*/
-# undef SIZEOF_LONG_LONG
-# define SIZEOF_LONG_LONG SIZEOF___INT64
+# undef H5_SIZEOF_LONG_LONG
+# define H5_SIZEOF_LONG_LONG H5_SIZEOF___INT64
#else
# define long_long long int
-# undef SIZEOF_LONG_LONG
-# define SIZEOF_LONG_LONG SIZEOF_LONG
+# undef H5_SIZEOF_LONG_LONG
+# define H5_SIZEOF_LONG_LONG H5_SIZEOF_LONG
#endif
/*
@@ -296,114 +287,114 @@ Move H5_inline into windows version of H5pubconf.h; avoid duplicating warnings.
* be exactly one byte wide because we use it for pointer calculations to
* void* memory.
*/
-#if SIZEOF_INT8_T==0
+#if H5_SIZEOF_INT8_T==0
typedef signed char int8_t;
-# undef SIZEOF_INT8_T
-# define SIZEOF_INT8_T SIZEOF_CHAR
-#elif SIZEOF_INT8_T==1
+# undef H5_SIZEOF_INT8_T
+# define H5_SIZEOF_INT8_T H5_SIZEOF_CHAR
+#elif H5_SIZEOF_INT8_T==1
#else
# error "the int8_t type must be 1 byte wide"
#endif
-#if SIZEOF_UINT8_T==0
+#if H5_SIZEOF_UINT8_T==0
typedef unsigned char uint8_t;
-# undef SIZEOF_UINT8_T
-# define SIZEOF_UINT8_T SIZEOF_CHAR
-#elif SIZEOF_UINT8_T==1
+# undef H5_SIZEOF_UINT8_T
+# define H5_SIZEOF_UINT8_T H5_SIZEOF_CHAR
+#elif H5_SIZEOF_UINT8_T==1
#else
# error "the uint8_t type must be 1 byte wide"
#endif
-#if SIZEOF_INT16_T>=2
-#elif SIZEOF_SHORT>=2
+#if H5_SIZEOF_INT16_T>=2
+#elif H5_SIZEOF_SHORT>=2
typedef short int16_t;
-# undef SIZEOF_INT16_T
-# define SIZEOF_INT16_T SIZEOF_SHORT
-#elif SIZEOF_INT>=2
+# undef H5_SIZEOF_INT16_T
+# define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT
+#elif H5_SIZEOF_INT>=2
typedef int int16_t;
-# undef SIZEOF_INT16_T
-# define SIZEOF_INT16_T SIZEOF_INT
+# undef H5_SIZEOF_INT16_T
+# define H5_SIZEOF_INT16_T H5_SIZEOF_INT
#else
# error "nothing appropriate for int16_t"
#endif
-#if SIZEOF_UINT16_T>=2
-#elif SIZEOF_SHORT>=2
+#if H5_SIZEOF_UINT16_T>=2
+#elif H5_SIZEOF_SHORT>=2
typedef unsigned short uint16_t;
-# undef SIZEOF_UINT16_T
-# define SIZEOF_UINT16_T SIZEOF_SHORT
-#elif SIZEOF_INT>=2
+# undef H5_SIZEOF_UINT16_T
+# define H5_SIZEOF_UINT16_T H5_SIZEOF_SHORT
+#elif H5_SIZEOF_INT>=2
typedef unsigned uint16_t;
-# undef SIZEOF_UINT16_T
-# define SIZEOF_UINT16_T SIZEOF_INT
+# undef H5_SIZEOF_UINT16_T
+# define H5_SIZEOF_UINT16_T H5_SIZEOF_INT
#else
# error "nothing appropriate for uint16_t"
#endif
-#if SIZEOF_INT32_T>=4
-#elif SIZEOF_SHORT>=4
+#if H5_SIZEOF_INT32_T>=4
+#elif H5_SIZEOF_SHORT>=4
typedef short int32_t;
-# undef SIZEOF_INT32_T
-# define SIZEOF_INT32_T SIZEOF_SHORT
-#elif SIZEOF_INT>=4
+# undef H5_SIZEOF_INT32_T
+# define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT
+#elif H5_SIZEOF_INT>=4
typedef int int32_t;
-# undef SIZEOF_INT32_T
-# define SIZEOF_INT32_T SIZEOF_INT
-#elif SIZEOF_LONG>=4
+# undef H5_SIZEOF_INT32_T
+# define H5_SIZEOF_INT32_T H5_SIZEOF_INT
+#elif H5_SIZEOF_LONG>=4
typedef long int32_t;
-# undef SIZEOF_INT32_T
-# define SIZEOF_INT32_T SIZEOF_LONG
+# undef H5_SIZEOF_INT32_T
+# define H5_SIZEOF_INT32_T H5_SIZEOF_LONG
#else
# error "nothing appropriate for int32_t"
#endif
-#if SIZEOF_UINT32_T>=4
-#elif SIZEOF_SHORT>=4
+#if H5_SIZEOF_UINT32_T>=4
+#elif H5_SIZEOF_SHORT>=4
typedef short uint32_t;
-# undef SIZEOF_UINT32_T
-# define SIZEOF_UINT32_T SIZEOF_SHORT
-#elif SIZEOF_INT>=4
+# undef H5_SIZEOF_UINT32_T
+# define H5_SIZEOF_UINT32_T H5_SIZEOF_SHORT
+#elif H5_SIZEOF_INT>=4
typedef unsigned int uint32_t;
-# undef SIZEOF_UINT32_T
-# define SIZEOF_UINT32_T SIZEOF_INT
-#elif SIZEOF_LONG>=4
+# undef H5_SIZEOF_UINT32_T
+# define H5_SIZEOF_UINT32_T H5_SIZEOF_INT
+#elif H5_SIZEOF_LONG>=4
typedef unsigned long uint32_t;
-# undef SIZEOF_UINT32_T
-# define SIZEOF_UINT32_T SIZEOF_LONG
+# undef H5_SIZEOF_UINT32_T
+# define H5_SIZEOF_UINT32_T H5_SIZEOF_LONG
#else
# error "nothing appropriate for uint32_t"
#endif
-#if SIZEOF_INT64_T>=8
-#elif SIZEOF_INT>=8
+#if H5_SIZEOF_INT64_T>=8
+#elif H5_SIZEOF_INT>=8
typedef int int64_t;
-# undef SIZEOF_INT64_T
-# define SIZEOF_INT64_T SIZEOF_INT
-#elif SIZEOF_LONG>=8
+# undef H5_SIZEOF_INT64_T
+# define H5_SIZEOF_INT64_T H5_SIZEOF_INT
+#elif H5_SIZEOF_LONG>=8
typedef long int64_t;
-# undef SIZEOF_INT64_T
-# define SIZEOF_INT64_T SIZEOF_LONG
-#elif SIZEOF_LONG_LONG>=8
+# undef H5_SIZEOF_INT64_T
+# define H5_SIZEOF_INT64_T H5_SIZEOF_LONG
+#elif H5_SIZEOF_LONG_LONG>=8
typedef long_long int64_t;
-# undef SIZEOF_INT64_T
-# define SIZEOF_INT64_T SIZEOF_LONG_LONG
+# undef H5_SIZEOF_INT64_T
+# define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG
#else
# error "nothing appropriate for int64_t"
#endif
-#if SIZEOF_UINT64_T>=8
-#elif SIZEOF_INT>=8
+#if H5_SIZEOF_UINT64_T>=8
+#elif H5_SIZEOF_INT>=8
typedef unsigned uint64_t;
-# undef SIZEOF_UINT64_T
-# define SIZEOF_UINT64_T SIZEOF_INT
-#elif SIZEOF_LONG>=8
+# undef H5_SIZEOF_UINT64_T
+# define H5_SIZEOF_UINT64_T H5_SIZEOF_INT
+#elif H5_SIZEOF_LONG>=8
typedef unsigned long uint64_t;
-# undef SIZEOF_UINT64_T
-# define SIZEOF_UINT64_T SIZEOF_LONG
-#elif SIZEOF_LONG_LONG>=8
+# undef H5_SIZEOF_UINT64_T
+# define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG
+#elif H5_SIZEOF_LONG_LONG>=8
typedef unsigned long_long uint64_t;
-# undef SIZEOF_UINT64_T
-# define SIZEOF_UINT64_T SIZEOF_LONG_LONG
+# undef H5_SIZEOF_UINT64_T
+# define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG
#else
# error "nothing appropriate for uint64_t"
#endif
diff --git a/test/big.c b/test/big.c
index 73c1766..9c0114b 100644
--- a/test/big.c
+++ b/test/big.c
@@ -18,7 +18,7 @@ const char *FILENAME[] = {
#define WRT_SIZE 4*1024
#define FAMILY_SIZE 1024*1024*1024
-#if SIZEOF_LONG_LONG >= 8
+#if H5_SIZEOF_LONG_LONG >= 8
# define GB8LL ((unsigned long_long)8*1024*1024*1024)
#else
# define GB8LL 0 /*cannot do the test*/
diff --git a/test/dtypes.c b/test/dtypes.c
index d758c70..6523e9d 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -264,19 +264,19 @@ reset_hdf5(void)
#endif
if (without_hardware_g) h5_no_hwconv();
#ifdef TEST_ALIGNMENT
- SET_ALIGNMENT(SCHAR, SIZEOF_CHAR);
- SET_ALIGNMENT(UCHAR, SIZEOF_CHAR);
- SET_ALIGNMENT(SHORT, SIZEOF_SHORT);
- SET_ALIGNMENT(USHORT, SIZEOF_SHORT);
- SET_ALIGNMENT(INT, SIZEOF_INT);
- SET_ALIGNMENT(UINT, SIZEOF_INT);
- SET_ALIGNMENT(LONG, SIZEOF_LONG);
- SET_ALIGNMENT(ULONG, SIZEOF_LONG);
- SET_ALIGNMENT(LLONG, SIZEOF_LONG_LONG);
- SET_ALIGNMENT(ULLONG, SIZEOF_LONG_LONG);
- SET_ALIGNMENT(FLOAT, SIZEOF_FLOAT);
- SET_ALIGNMENT(DOUBLE, SIZEOF_DOUBLE);
- SET_ALIGNMENT(LDOUBLE, SIZEOF_LONG_DOUBLE);
+ SET_ALIGNMENT(SCHAR, H5_SIZEOF_CHAR);
+ SET_ALIGNMENT(UCHAR, H5_SIZEOF_CHAR);
+ SET_ALIGNMENT(SHORT, H5_SIZEOF_SHORT);
+ SET_ALIGNMENT(USHORT, H5_SIZEOF_SHORT);
+ SET_ALIGNMENT(INT, H5_SIZEOF_INT);
+ SET_ALIGNMENT(UINT, H5_SIZEOF_INT);
+ SET_ALIGNMENT(LONG, H5_SIZEOF_LONG);
+ SET_ALIGNMENT(ULONG, H5_SIZEOF_LONG);
+ SET_ALIGNMENT(LLONG, H5_SIZEOF_LONG_LONG);
+ SET_ALIGNMENT(ULLONG, H5_SIZEOF_LONG_LONG);
+ SET_ALIGNMENT(FLOAT, H5_SIZEOF_FLOAT);
+ SET_ALIGNMENT(DOUBLE, H5_SIZEOF_DOUBLE);
+ SET_ALIGNMENT(LDOUBLE, H5_SIZEOF_LONG_DOUBLE);
#endif
}
@@ -3214,12 +3214,12 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
break;
case INT_LLONG:
memcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
- printf(" %29"PRINTF_LL_WIDTH"d\n", *((long_long*)aligned));
+ printf(" %29"H5_PRINTF_LL_WIDTH"d\n", *((long_long*)aligned));
break;
case INT_ULLONG:
memcpy(aligned, saved+j*sizeof(long_long),
sizeof(unsigned long_long));
- printf(" %29"PRINTF_LL_WIDTH"u\n",
+ printf(" %29"H5_PRINTF_LL_WIDTH"u\n",
*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3267,12 +3267,12 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
break;
case INT_LLONG:
memcpy(aligned, buf+j*sizeof(long_long), sizeof(long_long));
- printf(" %29"PRINTF_LL_WIDTH"d\n", *((long_long*)aligned));
+ printf(" %29"H5_PRINTF_LL_WIDTH"d\n", *((long_long*)aligned));
break;
case INT_ULLONG:
memcpy(aligned, buf+j*sizeof(long_long),
sizeof(unsigned long_long));
- printf(" %29"PRINTF_LL_WIDTH"u\n",
+ printf(" %29"H5_PRINTF_LL_WIDTH"u\n",
*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3311,10 +3311,10 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
printf(" %29lu\n", *((unsigned long*)hw));
break;
case INT_LLONG:
- printf(" %29"PRINTF_LL_WIDTH"d\n", *((long_long*)hw));
+ printf(" %29"H5_PRINTF_LL_WIDTH"d\n", *((long_long*)hw));
break;
case INT_ULLONG:
- printf(" %29"PRINTF_LL_WIDTH"u\n", *((unsigned long_long*)hw));
+ printf(" %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long_long*)hw));
break;
case INT_OTHER:
break;
@@ -3433,7 +3433,7 @@ my_isnan(flt_t type, void *val)
double x;
memcpy(&x, val, sizeof(double));
retval = (x!=x);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (FLT_LDOUBLE==type) {
long double x;
memcpy(&x, val, sizeof(long double));
@@ -3456,7 +3456,7 @@ my_isnan(flt_t type, void *val)
double x;
memcpy(&x, val, sizeof(double));
sprintf(s, "%g", x);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (FLT_LDOUBLE==type) {
long double x;
memcpy(&x, val, sizeof(long double));
@@ -3510,7 +3510,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
float hw_f; /*hardware-converted */
double hw_d; /*hardware-converted */
void *aligned=NULL; /*aligned buffer */
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
long double hw_ld; /*hardware-converted */
#endif
unsigned char *hw=NULL; /*ptr to hardware-conv'd*/
@@ -3558,7 +3558,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
} else if (H5Tequal(src, H5T_NATIVE_DOUBLE)) {
src_type_name = "double";
src_type = FLT_DOUBLE;
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (H5Tequal(src, H5T_NATIVE_LDOUBLE)) {
src_type_name = "long double";
src_type = FLT_LDOUBLE;
@@ -3574,7 +3574,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
} else if (H5Tequal(dst, H5T_NATIVE_DOUBLE)) {
dst_type_name = "double";
dst_type = FLT_DOUBLE;
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (H5Tequal(dst, H5T_NATIVE_LDOUBLE)) {
dst_type_name = "long double";
dst_type = FLT_LDOUBLE;
@@ -3634,7 +3634,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
} else {
for (j=0; j<nelmts; j++) {
/* Do it this way for alignment reasons */
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
long double temp[1];
#else
double temp[1];
@@ -3648,7 +3648,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
if (FLT_DOUBLE==src_type && FLT_FLOAT==dst_type) {
hw_d = *((float*)temp);
memcpy(buf+j*src_size, &hw_d, src_size);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (FLT_LDOUBLE==src_type && FLT_FLOAT==dst_type) {
hw_ld = *((float*)temp);
memcpy(buf+j*src_size, &hw_ld, src_size);
@@ -3669,7 +3669,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
for (j=0; j<nelmts; j++) {
hw_f = 911.0;
hw_d = 911.0;
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
hw_ld = 911.0;
#endif
@@ -3682,7 +3682,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
} else if (FLT_DOUBLE==dst_type) {
hw_d = *((float*)aligned);
hw = (unsigned char*)&hw_d;
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
hw_ld = *((float*)aligned);
hw = (unsigned char*)&hw_ld;
@@ -3696,13 +3696,13 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
} else if (FLT_DOUBLE==dst_type) {
hw_d = *((double*)aligned);
hw = (unsigned char*)&hw_d;
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
hw_ld = *((double*)aligned);
hw = (unsigned char*)&hw_ld;
#endif
}
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
memcpy(aligned, saved+j*sizeof(long double),
sizeof(long double));
@@ -3740,7 +3740,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
my_isnan(dst_type, (double*)buf+j) &&
my_isnan(dst_type, hw)) {
continue;
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (FLT_LDOUBLE==dst_type &&
my_isnan(dst_type, (long double*)buf+j) &&
my_isnan(dst_type, hw)) {
@@ -3779,7 +3779,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
memcpy(&x, (double*)buf+j, sizeof(double));
check_mant[0] = frexp(x, check_expo+0);
check_mant[1] = frexp(((double*)hw)[0], check_expo+1);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
long double x;
memcpy(&x, (long double*)buf+j, sizeof(long double));
@@ -3811,7 +3811,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
double x;
memcpy(&x, (double*)saved+j, sizeof(double));
printf(" %29.20e\n", x);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
long double x;
memcpy(&x, (long double*)saved+j, sizeof(long double));
@@ -3833,7 +3833,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
double x;
memcpy(&x, (double*)buf+j, sizeof(double));
printf(" %29.20e\n", x);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
long double x;
memcpy(&x, (long double*)buf+j, sizeof(long double));
@@ -3851,7 +3851,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
printf(" %29.20e\n", hw_f);
} else if (FLT_DOUBLE==dst_type) {
printf(" %29.20e\n", hw_d);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
printf(" %29.20Le\n", hw_ld);
#endif
@@ -3921,11 +3921,11 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_ULONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_SCHAR, H5T_NATIVE_ULLONG);
#endif
@@ -3935,11 +3935,11 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_ULONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_UCHAR, H5T_NATIVE_ULLONG);
#endif
@@ -3949,11 +3949,11 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_ULONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_SHORT, H5T_NATIVE_ULLONG);
#endif
@@ -3963,11 +3963,11 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_SHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_ULONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_USHORT, H5T_NATIVE_ULLONG);
#endif
@@ -3977,11 +3977,11 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_SHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_ULONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_INT, H5T_NATIVE_ULLONG);
#endif
@@ -3991,16 +3991,16 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_SHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_INT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_ULONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_UINT, H5T_NATIVE_ULLONG);
#endif
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_SCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_UCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_SHORT);
@@ -4008,13 +4008,13 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_UINT);
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_ULONG);
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_LONG, H5T_NATIVE_ULLONG);
#endif
#endif
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_SCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_UCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_SHORT);
@@ -4022,34 +4022,34 @@ run_integer_tests(const char *name)
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_UINT);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_LONG);
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_LLONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULONG, H5T_NATIVE_ULLONG);
#endif
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_SCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_UCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_SHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_ULONG);
#endif
nerrors += test_conv_int_1(name, H5T_NATIVE_LLONG, H5T_NATIVE_ULLONG);
#endif
-#if SIZEOF_LONG_LONG!=SIZEOF_LONG
+#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_SCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_UCHAR);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_SHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_USHORT);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_INT);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_UINT);
-#if SIZEOF_LONG!=SIZEOF_INT
+#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_LONG);
nerrors += test_conv_int_1(name, H5T_NATIVE_ULLONG, H5T_NATIVE_ULONG);
#endif
@@ -4141,7 +4141,7 @@ main(void)
/* Test software floating-point conversion functions */
nerrors += test_conv_flt_1("sw", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1("sw", H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
-#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE
+#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
nerrors += test_conv_flt_1("sw", H5T_NATIVE_FLOAT, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1("sw", H5T_NATIVE_DOUBLE, H5T_NATIVE_LDOUBLE);
nerrors += test_conv_flt_1("sw", H5T_NATIVE_LDOUBLE, H5T_NATIVE_FLOAT);
diff --git a/test/h5test.h b/test/h5test.h
index cc627ab..2240531 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -14,7 +14,7 @@
#include "hdf5.h"
#include "H5private.h"
-#ifdef STDC_HEADERS
+#ifdef H5_STDC_HEADERS
# include <signal.h>
#endif
diff --git a/test/tconfig.c b/test/tconfig.c
index 97e93e7..bef1916 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -99,85 +99,85 @@ void
test_config_ctypes(void)
{
/* standard basic types */
- vrfy_ctype(char, SIZEOF_CHAR);
- vrfy_ctype(int, SIZEOF_INT);
- vrfy_ctype(short, SIZEOF_SHORT);
- vrfy_ctype(long, SIZEOF_LONG);
- vrfy_ctype(float, SIZEOF_FLOAT);
- vrfy_ctype(double, SIZEOF_DOUBLE);
+ vrfy_ctype(char, H5_SIZEOF_CHAR);
+ vrfy_ctype(int, H5_SIZEOF_INT);
+ vrfy_ctype(short, H5_SIZEOF_SHORT);
+ vrfy_ctype(long, H5_SIZEOF_LONG);
+ vrfy_ctype(float, H5_SIZEOF_FLOAT);
+ vrfy_ctype(double, H5_SIZEOF_DOUBLE);
/* non-standard basic types */
-#if SIZEOF_LONG_LONG > 0
- vrfy_ctype(long_long, SIZEOF_LONG_LONG);
+#if H5_SIZEOF_LONG_LONG > 0
+ vrfy_ctype(long_long, H5_SIZEOF_LONG_LONG);
#endif
-#if SIZEOF_LONG_DOUBLE > 0
- vrfy_ctype(long double, SIZEOF_LONG_DOUBLE);
+#if H5_SIZEOF_LONG_DOUBLE > 0
+ vrfy_ctype(long double, H5_SIZEOF_LONG_DOUBLE);
#endif
-#if SIZEOF_UINT8_T > 0
- vrfy_ctype(uint8_t, SIZEOF_UINT8_T);
+#if H5_SIZEOF_UINT8_T > 0
+ vrfy_ctype(uint8_t, H5_SIZEOF_UINT8_T);
#endif
-#if SIZEOF_UINT16_T > 0
- vrfy_ctype(uint16_t, SIZEOF_UINT16_T);
+#if H5_SIZEOF_UINT16_T > 0
+ vrfy_ctype(uint16_t, H5_SIZEOF_UINT16_T);
#endif
-#if SIZEOF_UINT32_T > 0
- vrfy_ctype(uint32_t, SIZEOF_UINT32_T);
+#if H5_SIZEOF_UINT32_T > 0
+ vrfy_ctype(uint32_t, H5_SIZEOF_UINT32_T);
#endif
-#if SIZEOF_UINT64_T > 0
- vrfy_ctype(uint64_t, SIZEOF_UINT64_T);
+#if H5_SIZEOF_UINT64_T > 0
+ vrfy_ctype(uint64_t, H5_SIZEOF_UINT64_T);
#endif
-#if SIZEOF_UINT_FAST8_T > 0
- vrfy_ctype(uint_fast8_t, SIZEOF_UINT_FAST8_T);
+#if H5_SIZEOF_UINT_FAST8_T > 0
+ vrfy_ctype(uint_fast8_t, H5_SIZEOF_UINT_FAST8_T);
#endif
-#if SIZEOF_UINT_FAST16_T > 0
- vrfy_ctype(uint_fast16_t, SIZEOF_UINT_FAST16_T);
+#if H5_SIZEOF_UINT_FAST16_T > 0
+ vrfy_ctype(uint_fast16_t, H5_SIZEOF_UINT_FAST16_T);
#endif
-#if SIZEOF_UINT_FAST32_T > 0
- vrfy_ctype(uint_fast32_t, SIZEOF_UINT_FAST32_T);
+#if H5_SIZEOF_UINT_FAST32_T > 0
+ vrfy_ctype(uint_fast32_t, H5_SIZEOF_UINT_FAST32_T);
#endif
-#if SIZEOF_UINT_FAST64_T > 0
- vrfy_ctype(uint_fast64_t, SIZEOF_UINT_FAST64_T);
+#if H5_SIZEOF_UINT_FAST64_T > 0
+ vrfy_ctype(uint_fast64_t, H5_SIZEOF_UINT_FAST64_T);
#endif
-#if SIZEOF_UINT_LEAST8_T > 0
- vrfy_ctype(uint_least8_t, SIZEOF_UINT_LEAST8_T);
+#if H5_SIZEOF_UINT_LEAST8_T > 0
+ vrfy_ctype(uint_least8_t, H5_SIZEOF_UINT_LEAST8_T);
#endif
-#if SIZEOF_UINT_LEAST16_T > 0
- vrfy_ctype(uint_least16_t, SIZEOF_UINT_LEAST16_T);
+#if H5_SIZEOF_UINT_LEAST16_T > 0
+ vrfy_ctype(uint_least16_t, H5_SIZEOF_UINT_LEAST16_T);
#endif
-#if SIZEOF_UINT_LEAST32_T > 0
- vrfy_ctype(uint_least32_t, SIZEOF_UINT_LEAST32_T);
+#if H5_SIZEOF_UINT_LEAST32_T > 0
+ vrfy_ctype(uint_least32_t, H5_SIZEOF_UINT_LEAST32_T);
#endif
-#if SIZEOF_UINT_LEAST64_T > 0
- vrfy_ctype(uint_least64_t, SIZEOF_UINT_LEAST64_T);
+#if H5_SIZEOF_UINT_LEAST64_T > 0
+ vrfy_ctype(uint_least64_t, H5_SIZEOF_UINT_LEAST64_T);
#endif
/* pseudo standard basic types */
-#if SIZEOF___INT64 > 0
- vrfy_ctype(__int64, SIZEOF___INT64);
+#if H5_SIZEOF___INT64 > 0
+ vrfy_ctype(__int64, H5_SIZEOF___INT64);
#endif
-#if SIZEOF_OFF_T > 0
- vrfy_ctype(off_t, SIZEOF_OFF_T);
+#if H5_SIZEOF_OFF_T > 0
+ vrfy_ctype(off_t, H5_SIZEOF_OFF_T);
#endif
-#if SIZEOF_SIZE_T > 0
- vrfy_ctype(size_t, SIZEOF_SIZE_T);
+#if H5_SIZEOF_SIZE_T > 0
+ vrfy_ctype(size_t, H5_SIZEOF_SIZE_T);
#endif
-#if SIZEOF_SSIZE_T > 0
- vrfy_ctype(ssize_t, SIZEOF_SSIZE_T);
+#if H5_SIZEOF_SSIZE_T > 0
+ vrfy_ctype(ssize_t, H5_SIZEOF_SSIZE_T);
#endif
}
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 7dd3249..c61c7ed 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -2968,10 +2968,10 @@ print_enum(hid_t type)
for (j = 0; j < dst_size; j++)
printf("%02x", value[i * dst_size + j]);
} else if (H5T_SGN_NONE == H5Tget_sign(native)) {
- HDfprintf(stdout,"%" PRINTF_LL_WIDTH "u", *((unsigned long_long *)
+ HDfprintf(stdout,"%" H5_PRINTF_LL_WIDTH "u", *((unsigned long_long *)
((void *) (value + i * dst_size))));
} else {
- HDfprintf(stdout,"%" PRINTF_LL_WIDTH "d",
+ HDfprintf(stdout,"%" H5_PRINTF_LL_WIDTH "d",
*((long_long *) ((void *) (value + i * dst_size))));
}
@@ -4998,10 +4998,10 @@ xml_print_enum(hid_t type)
for (j = 0; j < dst_size; j++)
printf("%02x", value[i * dst_size + j]);
} else if (H5T_SGN_NONE == H5Tget_sign(native)) {
- HDfprintf(stdout,"%" PRINTF_LL_WIDTH "u", *((unsigned long_long *)
+ HDfprintf(stdout,"%" H5_PRINTF_LL_WIDTH "u", *((unsigned long_long *)
((void *) (value + i * dst_size))));
} else {
- HDfprintf(stdout,"%" PRINTF_LL_WIDTH "d",
+ HDfprintf(stdout,"%" H5_PRINTF_LL_WIDTH "d",
*((long_long *) ((void *) (value + i * dst_size))));
}
printf("\n");
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 5fd7df6..721dc5d 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -817,10 +817,10 @@ display_enum_type(hid_t type, int ind)
printf("%02x", value[i*dst_size+j]);
}
} else if (H5T_SGN_NONE==H5Tget_sign(native)) {
- HDfprintf(stdout,"%"PRINTF_LL_WIDTH"u",
+ HDfprintf(stdout,"%"H5_PRINTF_LL_WIDTH"u",
*((unsigned long_long*)((void*)(value+i*dst_size))));
} else {
- HDfprintf(stdout,"%"PRINTF_LL_WIDTH"d",
+ HDfprintf(stdout,"%"H5_PRINTF_LL_WIDTH"d",
*((long_long*)((void*)(value+i*dst_size))));
}
}
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 0836537..d389b57 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -517,8 +517,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
/* Build default formats for long long types */
if (!fmt_llong[0]) {
- sprintf(fmt_llong, "%%%sd", PRINTF_LL_WIDTH);
- sprintf(fmt_ullong, "%%%su", PRINTF_LL_WIDTH);
+ sprintf(fmt_llong, "%%%sd", H5_PRINTF_LL_WIDTH);
+ sprintf(fmt_ullong, "%%%su", H5_PRINTF_LL_WIDTH);
}
/* Append value depending on data type */