diff options
Diffstat (limited to 'ace/CDR_Base.h')
-rw-r--r-- | ace/CDR_Base.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/ace/CDR_Base.h b/ace/CDR_Base.h index 0503b9cae84..764e7bdcc1b 100644 --- a/ace/CDR_Base.h +++ b/ace/CDR_Base.h @@ -39,12 +39,6 @@ #include "ace/Basic_Types.h" #include "ace/Default_Constants.h" -#if !defined (_MSC_VER) || (_MSC_VER >= 1300) - // MSVC++ 6 can't handle partial template specializations so fall - // back on an unsigned char typedef. -# include "ace/If_Then_Else.h" -#endif /* _MSC_VER < 1300 */ - class ACE_Message_Block; @@ -167,19 +161,21 @@ public: /** * @name Basic OMG IDL Types * - * These types are for use in the CDR classes. The cleanest way to + * These types are for use in the CDRclasses. The cleanest way to * avoid complaints from all compilers is to define them all. */ //@{ -# if (defined (_MSC_VER) && (_MSC_VER < 1300)) - // MSVC++ 6 can't handle partial template specializations so fall - // back on an unsigned char typedef. + + // Versions of GNU G++ less than version 3.0 defined a pre-C99 + // bool type that was an enumeration. In some cases the enumeration + // could be promoted to an int, causing a potential problem where a + // 4 byte integer (for example) could be selected when attempting to + // send a boolean over a CDR stream. +#if defined (__GNUC__) && __GNUC__ < 3 typedef unsigned char Boolean; -# else - typedef ACE::If_Then_Else<(sizeof (bool) == 1), - bool, - unsigned char>::result_type Boolean; -# endif /* _MSC_VER <= 1300 */ +#else + typedef bool Boolean; +#endif /* bool || __GNUC__ < 3 */ typedef unsigned char Octet; typedef char Char; typedef ACE_WCHAR_T WChar; |