diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-05 15:53:31 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-05 15:53:31 +0000 |
commit | dc47e230ccde82845af00feada4b170945c42da6 (patch) | |
tree | 9d2e39047d89ef8aed82970bec340b7929962481 | |
parent | 2b73dbb3f5dafff2e44dbdc1314921c4598ce73e (diff) | |
download | ATCD-dc47e230ccde82845af00feada4b170945c42da6.tar.gz |
replaced defined (VXWORKS) && defined (ghs) with defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-rw-r--r-- | TAO/tao/corbacom.cpp | 20 | ||||
-rw-r--r-- | TAO/tao/corbacom.h | 56 | ||||
-rw-r--r-- | TAO/tao/encode.cpp | 12 |
3 files changed, 44 insertions, 44 deletions
diff --git a/TAO/tao/corbacom.cpp b/TAO/tao/corbacom.cpp index aa900f8d2b4..3347d963477 100644 --- a/TAO/tao/corbacom.cpp +++ b/TAO/tao/corbacom.cpp @@ -1,8 +1,8 @@ -// @(#)corbacom.cpp 1.1 95/08/31 +// @(#)corbacom.cpp 1.1 95/08/31 // Copyright 1994-1995 by Sun Microsystems Inc. // All Rights Reserved // -// ORB: support for primitive data types +// ORB: support for primitive data types #include "tao/corba.h" @@ -15,7 +15,7 @@ CORBA::string_copy (const CORBA::Char *str) if (!str) return 0; - CORBA::String retval = CORBA::string_alloc (ACE_OS::strlen (str)); + CORBA::String retval = CORBA::string_alloc (ACE_OS::strlen (str)); // clear the contents of the allocated string ACE_OS::memset(retval, '\0', ACE_OS::strlen (str)); @@ -56,7 +56,7 @@ CORBA::String_var::operator= (const CORBA::String_var& r) return *this; } -#if defined(VXWORKS) && defined(ghs) +#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) // NOTE: assuming that these don't exist unless they're declared in // that header file ... @@ -74,13 +74,13 @@ extern "C" CORBA::WChar * wscpy (CORBA::WChar *dest, const CORBA::WChar *src) { - CORBA::WChar *retval = dest; + CORBA::WChar *retval = dest; while ((*dest++ = *src++) != 0) continue; return retval; } -#endif /* VXWORKS && ghs */ +#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */ // Wide Character string utility support; this can need to be // integrated with the ORB's own memory allocation subsystem. @@ -97,13 +97,13 @@ CORBA::wstring_copy (const CORBA::WChar *const str) if (*str) return 0; -#if defined(VXWORKS) && defined(ghs) - CORBA::WString retval = CORBA::wstring_alloc (wslen (str)); +#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) + CORBA::WString retval = CORBA::wstring_alloc (wslen (str)); return wscpy (retval, str); -#else +#else /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */ CORBA::WString retval = CORBA::wstring_alloc (ACE_OS::strlen (str)); return ACE_OS::strcpy (retval, str); -#endif +#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */ } void diff --git a/TAO/tao/corbacom.h b/TAO/tao/corbacom.h index cd4c71f4399..49450606ab8 100644 --- a/TAO/tao/corbacom.h +++ b/TAO/tao/corbacom.h @@ -27,15 +27,15 @@ // configure fixed one-byte alignment policy, since some fixed policy // needs to apply throughout an ORB. -#if defined (_MSC_VER) -# pragma pack (push, 1) // VC++, stack 1-byte alignment policy +#if defined (_MSC_VER) +# pragma pack (push, 1) // VC++, stack 1-byte alignment policy -# ifdef _DEBUG // convert from VC++ convention ... -# define DEBUG // ... to normal convention -# endif +# ifdef _DEBUG // convert from VC++ convention ... +# define DEBUG // ... to normal convention +# endif -#elif defined (__BORLANDC__) -# pragma option -a // BC++, use 1 byte alignment +#elif defined (__BORLANDC__) +# pragma option -a // BC++, use 1 byte alignment #endif @@ -156,9 +156,9 @@ struct CORBA_SEQUENCE u_int length; #endif /* SIZEOF_LONG */ T *buffer; -# if SIZEOF_BOOL != 0 +# if SIZEOF_BOOL != 0 bool release; -# else /* "bool" not builtin to this compiler */ +# else /* "bool" not builtin to this compiler */ int release; # endif /* "bool" not builtin */ @@ -181,13 +181,13 @@ public: // typedef void Status; // g++ doesn't like this // return status of operations in a number of standard CORBA classes. -# if SIZEOF_BOOL != 0 - typedef bool Boolean; +# if SIZEOF_BOOL != 0 + typedef bool Boolean; # define B_FALSE false # define B_TRUE true -# else /* "bool" not builtin to this compiler */ - typedef int Boolean; +# else /* "bool" not builtin to this compiler */ + typedef int Boolean; enum { B_FALSE = 0, B_TRUE = 1 }; # endif /* "bool" not builtin */ @@ -205,14 +205,14 @@ public: // CORBA "Long" (and its unsigned cousin) are 32 bits, just like on // almost all C/C++ compilers. -# if SIZEOF_LONG == 4 +# if SIZEOF_LONG == 4 typedef long Long; typedef u_long ULong; # else // just assume "int" is 4 bytes long ... typedef int Long; typedef u_int ULong; -# endif /* SIZEOF_LONG != 4 */ +# endif /* SIZEOF_LONG != 4 */ // 94-9-32 Appendix A, also the OMG C++ mapping, stipulate that 64 // bit integers are "LongLong". @@ -222,13 +222,13 @@ public: // // NOTE: those are IDL extensions, not yet standard. -# if SIZEOF_LONG_LONG == 8 +# if SIZEOF_LONG_LONG == 8 typedef long long LongLong; typedef unsigned long long ULongLong; -# elif SIZEOF_LONG == 8 +# elif SIZEOF_LONG == 8 typedef long LongLong; typedef u_long ULongLong; -# elif defined (_MSC_VER) && _MSC_VER >= 900 +# elif defined (_MSC_VER) && _MSC_VER >= 900 typedef __int64 LongLong; typedef unsigned __int64 ULongLong; # else @@ -238,8 +238,8 @@ public: // can cope with the loss of range it can define conversion // operators itself. -# define NONNATIVE_LONGLONG -# if defined (TAO_WORDS_BIGENDIAN) +# define NONNATIVE_LONGLONG +# if defined (TAO_WORDS_BIGENDIAN) struct LongLong { Long h, l; }; struct ULongLong { Long h, l; }; # else @@ -263,10 +263,10 @@ public: // // NOTE: that is an IDL extension, not yet standard. -# if SIZEOF_LONG_DOUBLE == 16 +# if SIZEOF_LONG_DOUBLE == 16 typedef long double LongDouble; # else -# define NONNATIVE_LONGDOUBLE +# define NONNATIVE_LONGDOUBLE struct LongDouble { char ld[16]; @@ -398,11 +398,11 @@ public: // // NOTE: those are IDL extensions, not yet standard. -#if defined(VXWORKS) && defined(ghs) +#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) typedef short WChar; -#else +#else /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */ typedef wchar_t WChar; -#endif +#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */ typedef WChar *WString; typedef WChar &WChar_out; // out type for WChar @@ -647,7 +647,7 @@ public: TAO_SYSTEM_EXCEPTION(BAD_CONTEXT); TAO_SYSTEM_EXCEPTION(OBJ_ADAPTER); TAO_SYSTEM_EXCEPTION(DATA_CONVERSION); -#undef TAO_SYSTEM_EXCEPTION +#undef TAO_SYSTEM_EXCEPTION static TypeCode_ptr _tc_Bounds; static TypeCode_ptr _tc_BadKind; @@ -700,8 +700,8 @@ extern "C" TAO_Export const TAO_IID IID_POA; // NOTE: stub APIs are nonportable, and must be explicitly #included // by code emitted from an IDL compiler. -#if defined (_MSC_VER) -# pragma pack (pop) // VC++, goes back to other padding rules +#if defined (_MSC_VER) +# pragma pack (pop) // VC++, goes back to other padding rules #endif /* VC++ */ // BC++ we leave with 1-byte padding rules... diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp index 2dfdd5ceaa5..76859c522b5 100644 --- a/TAO/tao/encode.cpp +++ b/TAO/tao/encode.cpp @@ -21,13 +21,13 @@ #include "tao/corba.h" -#if defined(VXWORKS) && defined(ghs) +#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) extern "C" { u_int wslen (const CORBA::WChar *); CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *); } -#endif /* HAVE_WIDEC_H */ +#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */ extern CORBA::TypeCode TC_opaque; @@ -1301,11 +1301,11 @@ TAO_Marshal_WString::encode (CORBA::TypeCode_ptr tc, if (env.exception () == 0) { // get the actual length of the string -#if defined(VXWORKS) && defined(ghs) - CORBA::ULong len = wslen ((CORBA::WChar *) str); -#else +#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) + CORBA::ULong len = wslen ((CORBA::WChar *) str); +#else /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */ CORBA::ULong len = ACE_OS::strlen (str); -#endif +#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */ // if it is an unbounded string or if the length is less than the // bounds for an unbounded string |