summaryrefslogtreecommitdiff
path: root/ace/Log_Record.cpp
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-01 17:57:41 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-01 17:57:41 +0000
commit52d506a41bb7645c30ab37b3d77da33e186fa584 (patch)
treeb16229cb09483756ed9c560111b40ebceaa7fa69 /ace/Log_Record.cpp
parent078a293b513620b912af488def022fe20c790f24 (diff)
downloadATCD-52d506a41bb7645c30ab37b3d77da33e186fa584.tar.gz
pSOS Diab and Trimedia compiler port checkin
Diffstat (limited to 'ace/Log_Record.cpp')
-rw-r--r--ace/Log_Record.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp
index 2136cccc7bf..eaa6e9bdc55 100644
--- a/ace/Log_Record.cpp
+++ b/ace/Log_Record.cpp
@@ -6,7 +6,7 @@
#include "ace/streams.h"
#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LOG_Record.i"
+#include "ace/Log_Record.i"
#endif
ACE_RCSID(ace, Log_Record, "$Id$")
@@ -142,8 +142,13 @@ ACE_Log_Record::print (const ASYS_TCHAR *host_name,
ctp[19] = '\0'; // NUL-terminate after the time.
ctp[24] = '\0'; // NUL-terminate after the date.
+#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
+ const ASYS_TCHAR *lhost_name = (const ASYS_TCHAR *) ((host_name == 0)
+ ? ((char *) "<local_host>") : ((char *) host_name));
+#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
const ASYS_TCHAR *lhost_name = host_name ==
0 ? ASYS_TEXT ("<local_host>") : host_name;
+#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ret = ACE_OS::fprintf (fp,
ASYS_TEXT ("%s.%d %s@%s@%d@%s@%s"),
@@ -191,8 +196,14 @@ ACE_Log_Record::print (const ASYS_TCHAR host_name[],
ctp[19] = '\0'; // NUL-terminate after the time.
ctp[24] = '\0'; // NUL-terminate after the date.
+#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
+ const ASYS_TCHAR *lhost_name =
+ (const ASYS_TCHAR *) ((host_name == 0)
+ ? ((char *) "<local_host>") : ((char *) host_name));
+#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
const ASYS_TCHAR *lhost_name = host_name ==
0 ? ASYS_TEXT ("<local_host>") : host_name;
+#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
s << (ctp + 4) << '.'
// The following line isn't portable, so I've commented it out...