summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-04-16 20:36:16 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-04-16 20:36:16 +0000
commit7a96e9028753f86ff5b2b8fd80f5534720e84501 (patch)
tree038139fb50e450b30dea00c87b4ff8bbead32557
parentcb0ec3e05ef6e403b731c298076f76743888eb97 (diff)
downloadATCD-7a96e9028753f86ff5b2b8fd80f5534720e84501.tar.gz
ChangeLogTag:Wed Apr 16 13:35:34 2003 Ossama Othman <ossama@uci.edu>
-rw-r--r--ChangeLog14
-rw-r--r--ace/Basic_Types.h8
-rw-r--r--ace/CDR_Base.h15
-rw-r--r--ace/OS.h20
4 files changed, 21 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 504a733a6b6..034d680248a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Wed Apr 16 13:35:34 2003 Ossama Othman <ossama@uci.edu>
+
+ * ace/Basic_Types.h (ACE_WINT_T, ACE_WCHAR_T):
+ * ace/CDR_Base.h (WChar):
+ * ace/OS.h (WChar):
+
+ Cleaned up redundant and inconsistent wide character related
+ typedefs. The ACE_OS::WChar and ACE_CDR::WChar types are now
+ based on the ACE_WCHAR_T type defined in ace/Basic_Types.h
+ rather than using a set of preprocessor conditionals to set
+ them. In particular, the preprocessor conditionals are now
+ localized in ace/Basic_Types.h. This reduces maintenance burden
+ since a single location need be modified instead of multiple.
+
Wed Apr 16 19:27:29 UTC 2003 Don Hinton <dhinton@drestystems.com>
* ace/Get_Opt.{h,cpp}:
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
index b7c0e7e44d4..97369369461 100644
--- a/ace/Basic_Types.h
+++ b/ace/Basic_Types.h
@@ -216,7 +216,7 @@
# error Have to add to the ACE_UINT16 type setting
# endif
-typedef ACE_UINT16 ACE_USHORT16;
+typedef ACE_UINT16 ACE_USHORT16; // @@ Backward compatibility.
// Define a generic byte for use in codecs
typedef unsigned char ACE_Byte;
@@ -224,12 +224,12 @@ typedef unsigned char ACE_Byte;
// Define a pseudo wide character type when wchar is not supported so we
// can support basic wide character string operations.
-# if defined (ACE_HAS_WCHAR)
+# if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
# define ACE_WINT_T wint_t
# define ACE_WCHAR_T wchar_t
# else
-# define ACE_WINT_T ACE_USHORT16
-# define ACE_WCHAR_T ACE_USHORT16
+# define ACE_WINT_T ACE_UINT16
+# define ACE_WCHAR_T ACE_UINT16
# endif /* ACE_HAS_WCHAR */
# if ACE_SIZEOF_INT == 4
diff --git a/ace/CDR_Base.h b/ace/CDR_Base.h
index b0bc962fee2..a33217aa3ed 100644
--- a/ace/CDR_Base.h
+++ b/ace/CDR_Base.h
@@ -171,20 +171,7 @@ public:
typedef unsigned char Octet;
typedef char Char;
- //@{ @name Wide-character strings
- // @@ UNICODE: (brunsch) Can this be handled better?
- // The following WChar typedef and functions are used by TAO. TAO
- // does not use wchar_t because the size of wchar_t is
- // platform-dependent. These are to be used for all
- // manipulate\ions of CORBA::WString.
- // @@ (othman) IMHO, it is the lesser of two evils to use the
- // correct type for the platform rather than (forcibly) assume
- // that all wide characters are 16 bits.
-#if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
- typedef wchar_t WChar;
-#else
- typedef ACE_UINT16 WChar;
-#endif
+ typedef ACE_WCHAR_T WChar;
typedef ACE_INT16 Short;
typedef ACE_UINT16 UShort;
typedef ACE_INT32 Long;
diff --git a/ace/OS.h b/ace/OS.h
index 15d6e160095..64469f60437 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -5763,24 +5763,8 @@ public:
//@}
//@{ @name Wide-character strings
- // @@ UNICODE: (brunsch) Can this be handled better?
- // The following WChar typedef and functions are used by TAO. TAO
- // does not use wchar_t because the size of wchar_t is
- // platform-dependent. These are to be used for all
- // manipulate\ions of CORBA::WString.
- // @@ (othman) IMHO, it is the lesser of two evils to use the
- // correct type for the platform rather than (forcibly) assume
- // that all wide characters are 16 bits.
- /**
- * @todo Move this typedef to a separate file so as not to have the
- * same typedefs duplicated in multiple headers
- * (e.g. CDR_Base.h).
- */
-#if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
- typedef wchar_t WChar;
-#else
- typedef ACE_UINT16 WChar;
-#endif
+ typedef ACE_WCHAR_T WChar;
+
static u_int wslen (const WChar *);
static WChar *wscpy (WChar *,
const WChar *);