mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
Removes type guesses when C99 types are missing (#807)
This commit is contained in:
parent
2090a527c1
commit
9ac96e5a21
@ -355,74 +355,6 @@
|
||||
#define TRUE true
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Numeric data types. Some of these might be defined in Posix.1g, otherwise
|
||||
* we define them with the closest available type which is at least as large
|
||||
* as the number of bits indicated in the type name. The `int8' types *must*
|
||||
* be exactly one byte wide because we use it for pointer calculations to
|
||||
* void* memory.
|
||||
*/
|
||||
#if H5_SIZEOF_INT8_T == 0
|
||||
typedef signed char int8_t;
|
||||
#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 H5_SIZEOF_UINT8_T == 0
|
||||
typedef unsigned char uint8_t;
|
||||
#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 H5_SIZEOF_INT16_T >= 2
|
||||
#elif H5_SIZEOF_SHORT >= 2
|
||||
typedef short int16_t;
|
||||
#undef H5_SIZEOF_INT16_T
|
||||
#define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT
|
||||
#elif H5_SIZEOF_INT >= 2
|
||||
typedef int int16_t;
|
||||
#undef H5_SIZEOF_INT16_T
|
||||
#define H5_SIZEOF_INT16_T H5_SIZEOF_INT
|
||||
#else
|
||||
#error "nothing appropriate for int16_t"
|
||||
#endif
|
||||
|
||||
#if H5_SIZEOF_UINT16_T >= 2
|
||||
#elif H5_SIZEOF_SHORT >= 2
|
||||
typedef unsigned short uint16_t;
|
||||
#undef H5_SIZEOF_UINT16_T
|
||||
#define H5_SIZEOF_UINT16_T H5_SIZEOF_SHORT
|
||||
#elif H5_SIZEOF_INT >= 2
|
||||
typedef unsigned uint16_t;
|
||||
#undef H5_SIZEOF_UINT16_T
|
||||
#define H5_SIZEOF_UINT16_T H5_SIZEOF_INT
|
||||
#else
|
||||
#error "nothing appropriate for uint16_t"
|
||||
#endif
|
||||
|
||||
#if H5_SIZEOF_INT32_T >= 4
|
||||
#elif H5_SIZEOF_SHORT >= 4
|
||||
typedef short int32_t;
|
||||
#undef H5_SIZEOF_INT32_T
|
||||
#define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT
|
||||
#elif H5_SIZEOF_INT >= 4
|
||||
typedef int int32_t;
|
||||
#undef H5_SIZEOF_INT32_T
|
||||
#define H5_SIZEOF_INT32_T H5_SIZEOF_INT
|
||||
#elif H5_SIZEOF_LONG >= 4
|
||||
typedef long int32_t;
|
||||
#undef H5_SIZEOF_INT32_T
|
||||
#define H5_SIZEOF_INT32_T H5_SIZEOF_LONG
|
||||
#else
|
||||
#error "nothing appropriate for int32_t"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum and minimum values. These should be defined in <limits.h> for the
|
||||
* most part.
|
||||
|
Loading…
Reference in New Issue
Block a user