summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2007-03-13 19:38:26 +0000
committerSteve Huston <shuston@riverace.com>2007-03-13 19:38:26 +0000
commit0cb9a3d9e381833e7af198bd313a56f552dcda79 (patch)
treeb9ef5ddf2bb0d7a01df717af0df8d1d12695f184
parent3e820dbf38dc3442e115cb8b4b8227c7f6801685 (diff)
downloadATCD-0cb9a3d9e381833e7af198bd313a56f552dcda79.tar.gz
ChangeLogTag:Tue Mar 13 19:36:09 UTC 2007 Steve Huston <shuston@riverace.com>
-rw-r--r--ACE/ChangeLog8
-rw-r--r--ACE/ace/OS_NS_stdio.cpp12
2 files changed, 16 insertions, 4 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 2a0e496eb44..1dd76b66b38 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,11 @@
+Tue Mar 13 19:36:09 UTC 2007 Steve Huston <shuston@riverace.com>
+
+ * ace/OS_NS_stdio.cpp (snprintf): Back off use of _vsnwprintf_s() in
+ the wide-char version as was done in the narrow-char version (see
+ Mon Mar 12 17:55:18 UTC 2007 Steve Huston <shuston@riverace.com>).
+ Also, in sprintf(), correct the selection of 3 vs 4 arg call for
+ WinCE.
+
Tue Mar 13 18:43:28 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
* bin/tao_orb_tests.lst:
diff --git a/ACE/ace/OS_NS_stdio.cpp b/ACE/ace/OS_NS_stdio.cpp
index ede24d62519..1d78300260b 100644
--- a/ACE/ace/OS_NS_stdio.cpp
+++ b/ACE/ace/OS_NS_stdio.cpp
@@ -332,8 +332,11 @@ ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...)
int result;
va_list ap;
va_start (ap, format);
-# if defined (ACE_HAS_TR24731_2005_CRT)
- result = _vsnwprintf_s (buf, maxlen + 1, _TRUNCATE, format, ap);
+# if 0 /* defined (ACE_HAS_TR24731_2005_CRT) */
+ // _vsnwprintf_s() doesn't report the length needed when it truncates. This
+ // info is needed for the API contract return value, so don't use this.
+ // There's adequate protection via the maxlen.
+ result = _vsnwprintf_s (buf, maxlen, _TRUNCATE, format, ap);
# elif defined (ACE_WIN32)
// Microsoft's vswprintf() doesn't have the maxlen argument that
// XPG4/UNIX98 define. They do, however, recommend use of _vsnwprintf()
@@ -389,8 +392,9 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...)
# if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) || \
(defined (sun) && !defined (_XPG4) || defined(_XPG5)) || \
- (defined ACE_HAS_DINKUM_STL) || defined (__DMC__) || \
- defined ACE_HAS_VSWPRINTF || defined (ACE_WIN32_VC8)
+ defined (ACE_HAS_DINKUM_STL) || defined (__DMC__) || \
+ defined (ACE_HAS_VSWPRINTF) || \
+ (defined (ACE_WIN32_VC8) && !defined (ACE_HAS_WINCE))
// The XPG4/UNIX98/C99 signature of the wide-char sprintf has a
// maxlen argument. Since this method doesn't supply one, pass in