diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-06-27 06:10:37 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-06-27 06:10:37 +0000 |
commit | 702d476d0b1ae8241a51f887df324ab692824b8a (patch) | |
tree | bd37e66d2eda7d1cacdd313b0c6b8e0ef3343795 /ACE/ace/Log_Record.cpp | |
parent | beca8cac08cc7b53ee28547eafb2518a0382b097 (diff) | |
download | ATCD-702d476d0b1ae8241a51f887df324ab692824b8a.tar.gz |
Wed Jun 27 06:09:39 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/Log_Record.cpp')
-rw-r--r-- | ACE/ace/Log_Record.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ACE/ace/Log_Record.cpp b/ACE/ace/Log_Record.cpp index 1d6aea09359..e08f7c4ed7a 100644 --- a/ACE/ace/Log_Record.cpp +++ b/ACE/ace/Log_Record.cpp @@ -291,19 +291,23 @@ ACE_Log_Record::print (const ACE_TCHAR host_name[], ACE_TCHAR *verbose_msg = 0; ACE_NEW_RETURN (verbose_msg, ACE_TCHAR[MAXVERBOSELOGMSGLEN], -1); - int result = this->format_msg (host_name, - verbose_flag, - verbose_msg); + int result = this->format_msg (host_name, verbose_flag, verbose_msg); if (result == 0) { if (fp != 0) { - int verbose_msg_len = + int const verbose_msg_len = static_cast<int> (ACE_OS::strlen (verbose_msg)); - int fwrite_result = ACE_OS::fprintf (fp, - ACE_LIB_TEXT ("%s"), - verbose_msg); +#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) + int const fwrite_result = ACE_OS::fprintf (fp, + ACE_LIB_TEXT ("%ls"), + verbose_msg); +#else + int const fwrite_result = ACE_OS::fprintf (fp, + ACE_LIB_TEXT ("%s"), + verbose_msg); +#endif // We should have written everything if (fwrite_result != verbose_msg_len) result = -1; |