diff options
author | Steve Huston <shuston@riverace.com> | 2007-03-09 01:07:44 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2007-03-09 01:07:44 +0000 |
commit | a61714cf83a43552d74232bec6bf2965868142de (patch) | |
tree | 6553cb506c511a771a9aac20cc6ff91643494aaf /ACE/ace/OS_NS_string.inl | |
parent | acc13c6e0ae9f31dd5895864c7fe76bbc2a6f2f6 (diff) | |
download | ATCD-a61714cf83a43552d74232bec6bf2965868142de.tar.gz |
ChangeLogTag:Fri Mar 9 00:53:43 UTC 2007 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace/OS_NS_string.inl')
-rw-r--r-- | ACE/ace/OS_NS_string.inl | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/ACE/ace/OS_NS_string.inl b/ACE/ace/OS_NS_string.inl index 8f25a46615c..74cb06668ca 100644 --- a/ACE/ace/OS_NS_string.inl +++ b/ACE/ace/OS_NS_string.inl @@ -259,7 +259,12 @@ ACE_OS::strlen (const ACE_WCHAR_T *s) ACE_INLINE char * ACE_OS::strncat (char *s, const char *t, size_t len) { +#if defined (ACE_HAS_TR24731_2005_CRT) + strncat_s (s, len, t, _TRUNCATE); + return s; +#else return ::strncat (s, t, len); +#endif /* ACE_HAS_TR24731_2005_CRT */ } ACE_INLINE ACE_WCHAR_T * @@ -267,6 +272,9 @@ ACE_OS::strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) { # if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT) return ACE_OS::wcsncat_emulation (s, t, len); +# elif defined (ACE_HAS_TR24731_2005_CRT) + wcsncat_s (s, len, t, _TRUNCATE); + return s; # else /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCAT */ return ::wcsncat (s, t, len); # endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCAT */ @@ -521,7 +529,9 @@ ACE_OS::strtok (wchar_t *s, const wchar_t *tokens) ACE_INLINE char * ACE_OS::strtok_r (char *s, const char *tokens, char **lasts) { -#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (ACE_LACKS_STRTOK_R) +#if defined (ACE_HAS_TR24731_2005_CRT) + return strtok_s (s, tokens, lasts); +#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (ACE_LACKS_STRTOK_R) return ::strtok_r (s, tokens, lasts); #else return ACE_OS::strtok_r_emulation (s, tokens, lasts); @@ -532,14 +542,16 @@ ACE_OS::strtok_r (char *s, const char *tokens, char **lasts) ACE_INLINE wchar_t* ACE_OS::strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts) { -#if defined (ACE_LACKS_WCSTOK) - return ACE_OS::strtok_r_emulation (s, tokens, lasts); +#if defined (ACE_HAS_TR24731_2005_CRT) + return wcstok_s (s, tokens, lasts); +#elif defined (ACE_LACKS_WCSTOK) + return ACE_OS::strtok_r_emulation (s, tokens, lasts); #else # if defined (ACE_HAS_3_PARAM_WCSTOK) - return ::wcstok (s, tokens, lasts); + return ::wcstok (s, tokens, lasts); # else /* ACE_HAS_3_PARAM_WCSTOK */ - *lasts = ::wcstok (s, tokens); - return *lasts; + *lasts = ::wcstok (s, tokens); + return *lasts; # endif /* ACE_HAS_3_PARAM_WCSTOK */ #endif /* ACE_LACKS_WCSTOK */ } |