diff options
author | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-10 06:30:50 +0000 |
---|---|---|
committer | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-10 06:30:50 +0000 |
commit | 89b10ffb6937e3172dcc79a450c2a2388031c89b (patch) | |
tree | 57f5183dc6d705ec49f3451fa03d8546c3f1e4ee | |
parent | e066c4ff0c41a6ac21413494e8a3dc1c0bcffaf0 (diff) | |
download | ATCD-89b10ffb6937e3172dcc79a450c2a2388031c89b.tar.gz |
ChangeLogTag: Mon Aug 9 23:13:48 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | ace/OS_NS_ctype.h | 11 | ||||
-rw-r--r-- | ace/OS_NS_ctype.inl | 9 | ||||
-rw-r--r-- | ace/OS_NS_strings.cpp | 12 | ||||
-rw-r--r-- | ace/OS_NS_wchar.cpp | 12 | ||||
-rw-r--r-- | ace/config-freebsd.h | 6 | ||||
-rw-r--r-- | examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp | 2 | ||||
-rw-r--r-- | tests/Config_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Proactor_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Proactor_Test_IPV6.cpp | 2 |
10 files changed, 46 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog index 8970ea8b5d0..9ca1b3457a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +Mon Aug 9 23:13:48 2004 J.T. Conklin <jtc@acorntoolworks.com> + + * ace/config-freebsd.h: + Remove #define of ACE_LACKS_TOWLOWER and ACE_LACKS_TOWUPPER. + FreeBSD has these functions, but they were disabled because + of the problem below. + + * ace/OS_NS_ctype.h: + * ace/OS_NS_ctyle.inl: + * ace/OS_NS_strings.cpp: + * ace/OS_NS_wchar.cpp: + * examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp: + * tests/Config_Test.cpp: + * tests/Proactor_Test.cpp: + * tests/Proactor_Test_IPV6.cpp: + Renamed ACE_OS::to_upper(int) and ACE_OS::to_upper(wint_t) to + ACE_OS::ace_toupper() and ACE_OS::ace_towupper() because they + are ambiguous on systems where wint_t is in fact an int. The + same was done for ACE_OS::to_lower(), etc. + + Mon Aug 9 18:12:12 UTC 2004 Johnny Willemsen <jwillemen@remedy.nl> * ace/OS_NS_stdlib.cpp (realpath): diff --git a/ace/OS_NS_ctype.h b/ace/OS_NS_ctype.h index b6c9e8d1de3..ce738790ef1 100644 --- a/ace/OS_NS_ctype.h +++ b/ace/OS_NS_ctype.h @@ -42,8 +42,7 @@ namespace ACE_OS { * equivalents. * * Since they are often implemented as macros, we don't use the same name - * here. Instead, we change by prepending "ace_" (with the exception of - * to_lower and to_upper). + * here. Instead, we change by prepending "ace_". */ //@{ @@ -93,22 +92,22 @@ namespace ACE_OS { /// Converts a character to lower case (char version). ACE_NAMESPACE_INLINE_FUNCTION - int to_lower (int c); + int ace_tolower (int c); #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER) /// Converts a character to lower case (wchar_t version). ACE_NAMESPACE_INLINE_FUNCTION - wint_t to_lower (wint_t c); + wint_t ace_towlower (wint_t c); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */ /// Converts a character to upper case (char version). ACE_NAMESPACE_INLINE_FUNCTION - int to_upper (int c); + int ace_toupper (int c); #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWUPPER) /// Converts a character to upper case (wchar_t version). ACE_NAMESPACE_INLINE_FUNCTION - wint_t to_upper (wint_t c); + wint_t ace_towupper (wint_t c); #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWUPPER */ //@} diff --git a/ace/OS_NS_ctype.inl b/ace/OS_NS_ctype.inl index 89a7270814d..13b8e05a1aa 100644 --- a/ace/OS_NS_ctype.inl +++ b/ace/OS_NS_ctype.inl @@ -114,30 +114,29 @@ ACE_OS::ace_isxdigit (const ACE_TCHAR c) } ACE_INLINE int -ACE_OS::to_lower (int c) +ACE_OS::ace_tolower (int c) { return tolower (c); } #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER) ACE_INLINE wint_t -ACE_OS::to_lower (wint_t c) +ACE_OS::ace_towlower (wint_t c) { return towlower (c); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */ ACE_INLINE int -ACE_OS::to_upper (int c) +ACE_OS::ace_toupper (int c) { return toupper (c); } #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWUPPER) ACE_INLINE wint_t -ACE_OS::to_upper (wint_t c) +ACE_OS::ace_towupper (wint_t c) { return towupper (c); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWUPPER */ - diff --git a/ace/OS_NS_strings.cpp b/ace/OS_NS_strings.cpp index 21d57924e0e..67ca3a809b8 100644 --- a/ace/OS_NS_strings.cpp +++ b/ace/OS_NS_strings.cpp @@ -21,8 +21,8 @@ ACE_OS::strcasecmp_emulation (const char *s, const char *t) const char *scan2 = t; while (*scan1 != 0 - && ACE_OS::to_lower (*scan1) - == ACE_OS::to_lower (*scan2)) + && ACE_OS::ace_tolower (*scan1) + == ACE_OS::ace_tolower (*scan2)) { ++scan1; ++scan2; @@ -39,7 +39,7 @@ ACE_OS::strcasecmp_emulation (const char *s, const char *t) else if (*scan2 == '\0') return 1; else - return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); + return ACE_OS::ace_tolower (*scan1) - ACE_OS::ace_tolower (*scan2); } #endif /* ACE_LACKS_STRCASECMP */ @@ -55,8 +55,8 @@ ACE_OS::strncasecmp_emulation (const char *s, while (count++ < len && *scan1 != 0 - && ACE_OS::to_lower (*scan1) - == ACE_OS::to_lower (*scan2)) + && ACE_OS::ace_tolower (*scan1) + == ACE_OS::ace_tolower (*scan2)) { ++scan1; ++scan2; @@ -76,6 +76,6 @@ ACE_OS::strncasecmp_emulation (const char *s, else if (*scan2 == '\0') return 1; else - return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); + return ACE_OS::ace_tolower (*scan1) - ACE_OS::ace_tolower (*scan2); } #endif /* ACE_LACKS_STRCASECMP */ diff --git a/ace/OS_NS_wchar.cpp b/ace/OS_NS_wchar.cpp index 03c480e9ea1..7150d7f3627 100644 --- a/ace/OS_NS_wchar.cpp +++ b/ace/OS_NS_wchar.cpp @@ -129,8 +129,8 @@ ACE_OS::wcsicmp_emulation (const wchar_t *s, const wchar_t *t) const wchar_t *scan2 = t; while (*scan1 != 0 - && ACE_OS::to_lower (*scan1) - == ACE_OS::to_lower (*scan2)) + && ACE_OS::ace_towlower (*scan1) + == ACE_OS::ace_towlower (*scan2)) { ++scan1; ++scan2; @@ -147,7 +147,7 @@ ACE_OS::wcsicmp_emulation (const wchar_t *s, const wchar_t *t) else if (*scan2 == '\0') return 1; else - return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); + return ACE_OS::ace_tolower (*scan1) - ACE_OS::ace_towlower (*scan2); } #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSICMP */ @@ -253,8 +253,8 @@ ACE_OS::wcsnicmp_emulation (const wchar_t *s, while (count++ < len && *scan1 != 0 - && ACE_OS::to_lower (*scan1) - == ACE_OS::to_lower (*scan2)) + && ACE_OS::ace_towlower (*scan1) + == ACE_OS::ace_towlower (*scan2)) { ++scan1; ++scan2; @@ -274,7 +274,7 @@ ACE_OS::wcsnicmp_emulation (const wchar_t *s, else if (*scan2 == '\0') return 1; else - return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2); + return ACE_OS::ace_towlower (*scan1) - ACE_OS::ace_towlower (*scan2); } #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSNICMP */ diff --git a/ace/config-freebsd.h b/ace/config-freebsd.h index b2134d49b27..da039c5d02b 100644 --- a/ace/config-freebsd.h +++ b/ace/config-freebsd.h @@ -265,12 +265,6 @@ typedef union sigval sigval_t; #define ACE_LACKS_ITOW #define ACE_HAS_3_PARAM_WCSTOK -// Even though we do have tolower, we have a conflict when ACE_HAS_WCHAR is defined. -#define ACE_LACKS_TOWLOWER - -// Even though we do have toupper, we have a conflict when ACE_HAS_WCHAR is defined. -#define ACE_LACKS_TOWUPPER - #if (__FreeBSD_version >= 501000) # define ACE_HAS_PTHREAD_SETSTACK #endif diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp index 9753fd4a2ca..3985f9369a2 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp @@ -15,7 +15,7 @@ Handle_L_Pipe::upper_case (char s[], int n) { while (--n >= 0) if (ACE_OS::ace_islower (s[n])) - s[n] = ACE_OS::to_upper (s[n]); + s[n] = ACE_OS::ace_toupper (s[n]); return s; } diff --git a/tests/Config_Test.cpp b/tests/Config_Test.cpp index 6fe3e5b0dfd..81d8e606fb7 100644 --- a/tests/Config_Test.cpp +++ b/tests/Config_Test.cpp @@ -1428,7 +1428,7 @@ Config_Test::get_section_boolean (ACE_Configuration& config, pSrc++) // Convert to uppercase if (ACE_OS::ace_islower (*pSrc)) - *pSrc = ACE_OS::to_lower (*pSrc); + *pSrc = ACE_OS::ace_tolower (*pSrc); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s = %s\n"), diff --git a/tests/Proactor_Test.cpp b/tests/Proactor_Test.cpp index a3ce1b084d5..e368a9f5c89 100644 --- a/tests/Proactor_Test.cpp +++ b/tests/Proactor_Test.cpp @@ -1704,7 +1704,7 @@ set_proactor_type (const ACE_TCHAR *ptype) if (!ptype) return 0; - switch (ACE_OS::to_upper (*ptype)) + switch (ACE_OS::ace_toupper (*ptype)) { case 'D': proactor_type = DEFAULT; diff --git a/tests/Proactor_Test_IPV6.cpp b/tests/Proactor_Test_IPV6.cpp index 35688cc3f78..c3896bb44de 100644 --- a/tests/Proactor_Test_IPV6.cpp +++ b/tests/Proactor_Test_IPV6.cpp @@ -1737,7 +1737,7 @@ set_proactor_type (const ACE_TCHAR *ptype) if (!ptype) return 0; - switch (ACE_OS::to_upper (*ptype)) + switch (ACE_OS::ace_toupper (*ptype)) { case 'D': proactor_type = DEFAULT; |