From 15691f8827f4f7b5c3badd6094af7911731886b4 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sun, 9 Apr 2006 21:45:11 -0500 Subject: [svn-r12216] Purpose: Code cleanup Description: Clean up some runtime errors from unsupported C99 types on Solaris 2.9 by wrapping them with ifdef's. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 32-bit (heping) Linux 2.4 64-bit (mir) Solaris 2.9 (shanti) Misc. update: --- c++/src/H5PredType.cpp | 16 ++++++++++++++++ c++/src/H5PredType.h | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index a2ca63c..6f1e5df 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -178,23 +178,39 @@ const PredType PredType::NATIVE_HBOOL( H5T_NATIVE_HBOOL ); const PredType PredType::NATIVE_INT8( H5T_NATIVE_INT8 ); const PredType PredType::NATIVE_UINT8( H5T_NATIVE_UINT8 ); +#if H5_SIZEOF_INT_LEAST8_T != 0 const PredType PredType::NATIVE_INT_LEAST8( H5T_NATIVE_INT_LEAST8 ); +#endif /* H5_SIZEOF_INT_LEAST8_T */ +#if H5_SIZEOF_UINT_LEAST8_T != 0 const PredType PredType::NATIVE_UINT_LEAST8( H5T_NATIVE_UINT_LEAST8 ); +#endif /* H5_SIZEOF_UINT_LEAST8_T */ const PredType PredType::NATIVE_INT16( H5T_NATIVE_INT16 ); const PredType PredType::NATIVE_UINT16( H5T_NATIVE_UINT16 ); +#if H5_SIZEOF_INT_LEAST16_T != 0 const PredType PredType::NATIVE_INT_LEAST16( H5T_NATIVE_INT_LEAST16 ); +#endif /* H5_SIZEOF_INT_LEAST16_T */ +#if H5_SIZEOF_UINT_LEAST16_T != 0 const PredType PredType::NATIVE_UINT_LEAST16( H5T_NATIVE_UINT_LEAST16 ); +#endif /* H5_SIZEOF_UINT_LEAST16_T */ const PredType PredType::NATIVE_INT32( H5T_NATIVE_INT32 ); const PredType PredType::NATIVE_UINT32( H5T_NATIVE_UINT32 ); +#if H5_SIZEOF_INT_LEAST32_T != 0 const PredType PredType::NATIVE_INT_LEAST32( H5T_NATIVE_INT_LEAST32 ); +#endif /* H5_SIZEOF_INT_LEAST32_T */ +#if H5_SIZEOF_UINT_LEAST32_T != 0 const PredType PredType::NATIVE_UINT_LEAST32( H5T_NATIVE_UINT_LEAST32 ); +#endif /* H5_SIZEOF_UINT_LEAST32_T */ const PredType PredType::NATIVE_INT64( H5T_NATIVE_INT64 ); const PredType PredType::NATIVE_UINT64( H5T_NATIVE_UINT64 ); +#if H5_SIZEOF_INT_LEAST64_T != 0 const PredType PredType::NATIVE_INT_LEAST64( H5T_NATIVE_INT_LEAST64 ); +#endif /* H5_SIZEOF_INT_LEAST64_T */ +#if H5_SIZEOF_UINT_LEAST64_T != 0 const PredType PredType::NATIVE_UINT_LEAST64( H5T_NATIVE_UINT_LEAST64 ); +#endif /* H5_SIZEOF_UINT_LEAST64_T */ // These are new types and waiting for enabling with C99; currently, // the H5T_NATIVE_xxx_FASTn are -1 on sol. 11/14/05 diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index c0f3cd1..84ca716 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -152,29 +152,45 @@ class H5_DLLCPP PredType : public AtomType { static const PredType NATIVE_INT8; static const PredType NATIVE_UINT8; +#if H5_SIZEOF_INT_LEAST8_T != 0 static const PredType NATIVE_INT_LEAST8; +#endif /* H5_SIZEOF_INT_LEAST8_T */ +#if H5_SIZEOF_UINT_LEAST8_T != 0 static const PredType NATIVE_UINT_LEAST8; +#endif /* H5_SIZEOF_UINT_LEAST8_T */ //static const PredType NATIVE_INT_FAST8; //static const PredType NATIVE_UINT_FAST8; static const PredType NATIVE_INT16; static const PredType NATIVE_UINT16; +#if H5_SIZEOF_INT_LEAST16_T != 0 static const PredType NATIVE_INT_LEAST16; +#endif /* H5_SIZEOF_INT_LEAST16_T */ +#if H5_SIZEOF_UINT_LEAST16_T != 0 static const PredType NATIVE_UINT_LEAST16; +#endif /* H5_SIZEOF_UINT_LEAST16_T */ //static const PredType NATIVE_INT_FAST16; //static const PredType NATIVE_UINT_FAST16; static const PredType NATIVE_INT32; static const PredType NATIVE_UINT32; +#if H5_SIZEOF_INT_LEAST32_T != 0 static const PredType NATIVE_INT_LEAST32; +#endif /* H5_SIZEOF_INT_LEAST32_T */ +#if H5_SIZEOF_UINT_LEAST32_T != 0 static const PredType NATIVE_UINT_LEAST32; +#endif /* H5_SIZEOF_UINT_LEAST32_T */ //static const PredType NATIVE_INT_FAST32; //static const PredType NATIVE_UINT_FAST32; static const PredType NATIVE_INT64; static const PredType NATIVE_UINT64; +#if H5_SIZEOF_INT_LEAST64_T != 0 static const PredType NATIVE_INT_LEAST64; +#endif /* H5_SIZEOF_INT_LEAST64_T */ +#if H5_SIZEOF_UINT_LEAST64_T != 0 static const PredType NATIVE_UINT_LEAST64; +#endif /* H5_SIZEOF_UINT_LEAST64_T */ //static const PredType NATIVE_INT_FAST64; //static const PredType NATIVE_UINT_FAST64; -- cgit v0.12