diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-06-11 15:53:15 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-06-11 15:53:15 (GMT) |
commit | 263bfa76ef70a96d195527b0063a929f2b57b78a (patch) | |
tree | 11760ef28ae04a24075cb71dfc0b78ed4d7fba05 /src/H5detect.c | |
parent | d6ba8a5095103b5799cd6aef4f291af275dca08d (diff) | |
download | hdf5-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/H5detect.c')
-rw-r--r-- | src/H5detect.c | 117 |
1 files changed, 98 insertions, 19 deletions
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); |