diff options
author | crodrigu <crodrigu@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-06-02 23:09:19 +0000 |
---|---|---|
committer | crodrigu <crodrigu@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-06-02 23:09:19 +0000 |
commit | 97eea73853a6a81c6a9a020b8b0be3b357cd6098 (patch) | |
tree | ada9ffc70bf71dc839aa68a8a70c3f76211cb2bc /ace/OS_String.inl | |
parent | d2c33e9a89b49f6c3e7ef710c62739af9a6adb0e (diff) | |
download | ATCD-97eea73853a6a81c6a9a020b8b0be3b357cd6098.tar.gz |
ChangeLogTag: Sun Jun 2 22:52:23 UTC 2002 Craig Rodrigues <crodrigu@bbn.com>
Diffstat (limited to 'ace/OS_String.inl')
-rw-r--r-- | ace/OS_String.inl | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/ace/OS_String.inl b/ace/OS_String.inl index 963014d727e..f73c2d17d07 100644 --- a/ace/OS_String.inl +++ b/ace/OS_String.inl @@ -522,12 +522,12 @@ ACE_OS_String::strtok (char *s, const char *tokens) ACE_INLINE wchar_t * ACE_OS_String::strtok (wchar_t *s, const wchar_t *tokens) { -#if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) +#if defined (ACE_HAS_3_PARAM_WCSTOK) static wchar_t *lasts; return ::wcstok (s, tokens, &lasts); #else return ::wcstok (s, tokens); -#endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */ +#endif /* ACE_HAS_3_PARAM_WCSTOK */ } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOK */ @@ -699,20 +699,16 @@ ACE_OS_String::strtok_r (char *s, const char *tokens, char **lasts) ACE_INLINE wchar_t* ACE_OS_String::strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) { -#if defined (ACE_HAS_REENTRANT_FUNCTIONS) -# if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) - // The XPG4 spec says 2-arg wcstok() is thread-safe. wcstok_r is obsolete. +#if defined (ACE_LACKS_WCSTOK) + return ACE_OS_String::strtok_r_emulation (s, tokens, lasts); +#else +# if defined (ACE_HAS_3_PARAM_WCSTOK) + return ::wcstok (s, tokens, lasts); +# else /* ACE_HAS_3_PARAM_WCSTOK */ *lasts = ::wcstok (s, tokens); return *lasts; -# else - // Apparantly, UNIX98 and ISO/ANSI C define this with 3 args. - // Still no mention of wcstok_r... - // return ::wcstok_r (s, tokens, lasts); - return ::wcstok (s, tokens, lasts); -# endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */ -#else - return ACE_OS_String::strtok_r_emulation (s, tokens, lasts); -#endif // ACE_HAS_REENTRANT_FUNCTIONS +# endif /* ACE_HAS_3_PARAM_WCSTOK */ +#endif /* ACE_LACKS_WCSTOK */ } #endif // ACE_HAS_WCHAR |