summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ChangeLog16
-rw-r--r--ACE/ace/Log_Msg.cpp106
-rw-r--r--ACE/ace/Log_Msg.h4
-rw-r--r--ACE/ace/config-freebsd.h1
-rw-r--r--ACE/ace/config-linux-common.h2
-rw-r--r--ACE/ace/config-lynxos.h1
-rw-r--r--ACE/ace/config-netbsd.h1
-rw-r--r--ACE/ace/config-openbsd.h1
-rw-r--r--ACE/ace/config-sunos5.4-g++.h2
-rw-r--r--ACE/ace/config-sunos5.4-sunc++-4.x.h2
-rw-r--r--ACE/ace/config-sunos5.5.h2
11 files changed, 56 insertions, 82 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index b46ded59df9..093f2113661 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,19 @@
+Wed Oct 28 11:54:03 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/Log_Msg.h:
+ * ace/Log_Msg.cpp:
+ Use ACE_OS::strsignal() instead of sys_siglist.
+
+ * ace/config-freebsd.h:
+ * ace/config-linux-common.h:
+ * ace/config-lynxos.h:
+ * ace/config-netbsd.h:
+ * ace/config-openbsd.h:
+ * ace/config-sunos5.4-g++.h:
+ * ace/config-sunos5.4-sunc++-4.x.h:
+ * ace/config-sunos5.5.h:
+ Removed legacy sys_siglist related settings.
+
Wed Oct 28 06:30:33 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* include/makeinclude/platform_sunos5_g++.GNU:
diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp
index e037e8dfc5c..44d14110338 100644
--- a/ACE/ace/Log_Msg.cpp
+++ b/ACE/ace/Log_Msg.cpp
@@ -51,14 +51,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg)
-// only used here... dhinton
-#if defined (ACE_HAS_SYS_SIGLIST)
-# if !defined (_sys_siglist)
-# define _sys_siglist sys_siglist
-# endif /* !defined (sys_siglist) */
-//extern char **_sys_siglist;
-#endif /* ACE_HAS_SYS_SIGLIST */
-
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
bool ACE_Log_Msg::key_created_ = 0;
# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
@@ -1355,17 +1347,17 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
}
case 'M': // Print the name of the priority of the message.
-
+
// Look at the format precision specifier. .1 is interpreted
// as a single character printout, otherwise we print the name of
// the priority.
-
+
// So, did we find a .1 specifier? Do we need to override it?
if (format[1] == ACE_TEXT('.') &&
format[2] == ACE_TEXT('1'))
{
// Yup.
- // Print a single character signifying the severity of the message
+ // Print a single character signifying the severity of the message
fp = format;
fp++;
@@ -1380,17 +1372,17 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
ACE_OS::strcpy (fp, ACE_TEXT ("lc"));
# endif /* HPUX */
# endif
-
+
# else /* ACE_USES_WCHAR */
// Non-unicode builds simply use a standard character format specifier
ACE_OS::strcpy (fp, ACE_TEXT ("c"));
-
-# endif /* ACE_USES_WCHAR */
+
+# endif /* ACE_USES_WCHAR */
// Below is an optimized (binary search based)
// version of the following simple piece of code:
- //
+ //
// log_priority == LM_SHUTDOWN ? 'S' : // Shutdown
// log_priority == LM_TRACE ? 'T' : // Trace
// log_priority == LM_DEBUG ? 'D' : // Debug
@@ -1407,23 +1399,23 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
if (can_check)
{
this_len = ACE_OS::snprintf
- (bp, bspace, format,
+ (bp, bspace, format,
#if !defined (ACE_USES_WCHAR) || defined (ACE_WIN32)
(int)
#else
(wint_t)
-#endif
- (log_priority <= LM_WARNING) ?
- (log_priority <= LM_DEBUG) ?
- (log_priority <= LM_TRACE) ?
+#endif
+ (log_priority <= LM_WARNING) ?
+ (log_priority <= LM_DEBUG) ?
+ (log_priority <= LM_TRACE) ?
(log_priority == LM_SHUTDOWN) ?
- ACE_TEXT('S') : ACE_TEXT('T') : ACE_TEXT('D') :
+ ACE_TEXT('S') : ACE_TEXT('T') : ACE_TEXT('D') :
(log_priority <= LM_NOTICE) ?
(log_priority == LM_INFO) ?
- ACE_TEXT('I') : ACE_TEXT('N') : ACE_TEXT('W') :
- (log_priority <= LM_CRITICAL) ?
- (log_priority <= LM_ERROR) ?
- (log_priority == LM_STARTUP) ?
+ ACE_TEXT('I') : ACE_TEXT('N') : ACE_TEXT('W') :
+ (log_priority <= LM_CRITICAL) ?
+ (log_priority <= LM_ERROR) ?
+ (log_priority == LM_STARTUP) ?
ACE_TEXT('U') : ACE_TEXT('E') : ACE_TEXT('C') :
(log_priority <= LM_EMERGENCY) ?
(log_priority == LM_ALERT) ?
@@ -1432,35 +1424,35 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
else
{
this_len = ACE_OS::sprintf
- (bp, format,
+ (bp, format,
#if !defined (ACE_USES_WCHAR) || defined (ACE_WIN32)
(int)
#else
(wint_t)
-#endif
- (log_priority <= LM_WARNING) ?
- (log_priority <= LM_DEBUG) ?
- (log_priority <= LM_TRACE) ?
+#endif
+ (log_priority <= LM_WARNING) ?
+ (log_priority <= LM_DEBUG) ?
+ (log_priority <= LM_TRACE) ?
(log_priority == LM_SHUTDOWN) ?
- ACE_TEXT('S') : ACE_TEXT('T') : ACE_TEXT('D') :
+ ACE_TEXT('S') : ACE_TEXT('T') : ACE_TEXT('D') :
(log_priority <= LM_NOTICE) ?
(log_priority == LM_INFO) ?
- ACE_TEXT('I') : ACE_TEXT('N') : ACE_TEXT('W') :
- (log_priority <= LM_CRITICAL) ?
- (log_priority <= LM_ERROR) ?
- (log_priority == LM_STARTUP) ?
+ ACE_TEXT('I') : ACE_TEXT('N') : ACE_TEXT('W') :
+ (log_priority <= LM_CRITICAL) ?
+ (log_priority <= LM_ERROR) ?
+ (log_priority == LM_STARTUP) ?
ACE_TEXT('U') : ACE_TEXT('E') : ACE_TEXT('C') :
(log_priority <= LM_EMERGENCY) ?
(log_priority == LM_ALERT) ?
ACE_TEXT('A') : ACE_TEXT('!') : ACE_TEXT('?'));
}
-
+
ACE_UPDATE_COUNT (bspace, this_len);
}
else
{
// Nope, print out standard priority_name() string
-
+
#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
ACE_OS::strcpy (fp, ACE_TEXT ("ls"));
#else
@@ -1476,7 +1468,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
ACE_Log_Record::priority_name (log_priority));
ACE_UPDATE_COUNT (bspace, this_len);
}
- break;
+ break;
case 'm': // Format the string assocated with the errno value.
{
@@ -1640,36 +1632,14 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
case 'S': // format the string for with this signal number.
{
- int sig = va_arg (argp, int);
-#if defined (ACE_HAS_SYS_SIGLIST)
- if (sig >= 0 && sig < ACE_NSIG)
- {
- ACE_OS::strcpy (fp, ACE_TEXT ("s"));
- if (can_check)
- this_len = ACE_OS::snprintf
- (bp, bspace, format, _sys_siglist[sig]);
- else
- this_len = ACE_OS::sprintf
- (bp, format, _sys_siglist[sig]);
- }
- else
- {
- if (can_check)
- this_len = ACE_OS::snprintf
- (bp, bspace,
- ACE_TEXT("<unknown signal> %d"), sig);
- else
- this_len = ACE_OS::sprintf
- (bp, ACE_TEXT ("<unknown signal> %d"), sig);
- }
-#else
- if (can_check)
- this_len = ACE_OS::snprintf
- (bp, bspace, ACE_TEXT ("signal %d"), sig);
- else
- this_len = ACE_OS::sprintf
- (bp, ACE_TEXT ("signal %d"), sig);
-#endif /* ACE_HAS_SYS_SIGLIST */
+ const int sig = va_arg (argp, int);
+ ACE_OS::strcpy (fp, ACE_TEXT ("s"));
+ if (can_check)
+ this_len = ACE_OS::snprintf
+ (bp, bspace, format, ACE_OS::strsignal(sig));
+ else
+ this_len = ACE_OS::sprintf
+ (bp, format, ACE_OS::strsignal(sig));
ACE_UPDATE_COUNT (bspace, this_len);
break;
}
diff --git a/ACE/ace/Log_Msg.h b/ACE/ace/Log_Msg.h
index a59e34390f1..aff1e216e4b 100644
--- a/ACE/ace/Log_Msg.h
+++ b/ACE/ace/Log_Msg.h
@@ -525,8 +525,8 @@ public:
* - '@': print a void* pointer (in hexadecimal)
* - 'r': call the function pointed to by the corresponding argument
* - 'R': print return status
- * - 'S': print out the appropriate _sys_siglist entry corresponding
- * to var-argument.
+ * - 'S': print out the appropriate signal message corresponding
+ * to var-argument, e.g., as done by strsignal()
* - 's': prints a ACE_TCHAR* character string (also see C and W)
* - 'T': print timestamp in hour:minute:sec:usec format.
* - 'D': print timestamp as Weekday Month day year hour:minute:sec.usec
diff --git a/ACE/ace/config-freebsd.h b/ACE/ace/config-freebsd.h
index 7dfa5a07b34..536c757f9a0 100644
--- a/ACE/ace/config-freebsd.h
+++ b/ACE/ace/config-freebsd.h
@@ -82,7 +82,6 @@
#define ACE_HAS_SYSCTL
#define ACE_HAS_SYSV_IPC
#define ACE_HAS_SYS_FILIO_H
-#define ACE_HAS_SYS_SIGLIST
#define ACE_HAS_STRSIGNAL
#define ACE_HAS_SYS_SOCKIO_H
#define ACE_HAS_SYS_SYSCALL_H
diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h
index 1b1c6a03c06..f268ed3ab2e 100644
--- a/ACE/ace/config-linux-common.h
+++ b/ACE/ace/config-linux-common.h
@@ -209,8 +209,6 @@
#define ACE_HAS_UALARM
-#define ACE_HAS_SYS_SIGLIST
-
#define ACE_HAS_STRSIGNAL
#if __GLIBC__ >= 2
diff --git a/ACE/ace/config-lynxos.h b/ACE/ace/config-lynxos.h
index 382bbdb232b..786efb8125c 100644
--- a/ACE/ace/config-lynxos.h
+++ b/ACE/ace/config-lynxos.h
@@ -179,7 +179,6 @@
# define ACE_LACKS_STRRECVFD
# define ACE_LACKS_SYS_SEM_H
# define ACE_SYS_SIGLIST __sys_siglist
-# define _sys_siglist __sys_siglist
#else
// LynxOS 5.0 Removals
# define ACE_HAS_LYNXOS_SIGNALS
diff --git a/ACE/ace/config-netbsd.h b/ACE/ace/config-netbsd.h
index a618369b229..34137dab361 100644
--- a/ACE/ace/config-netbsd.h
+++ b/ACE/ace/config-netbsd.h
@@ -77,7 +77,6 @@
#define ACE_HAS_SVR4_DYNAMIC_LINKING 1
#define ACE_HAS_SYSV_IPC 1
#define ACE_HAS_SYS_FILIO_H 1
-#define ACE_HAS_SYS_SIGLIST 1
#define ACE_HAS_STRSIGNAL
#define ACE_HAS_SYS_SOCKIO_H 1
#define ACE_HAS_SYS_SYSCALL_H 1
diff --git a/ACE/ace/config-openbsd.h b/ACE/ace/config-openbsd.h
index 2b9b4e272c6..83824daa0ed 100644
--- a/ACE/ace/config-openbsd.h
+++ b/ACE/ace/config-openbsd.h
@@ -125,7 +125,6 @@
#define ACE_HAS_SYSCTL
#define ACE_HAS_SYSV_IPC
#define ACE_HAS_SYS_FILIO_H
-#define ACE_HAS_SYS_SIGLIST
#define ACE_HAS_STRSIGNAL
#define ACE_HAS_SYS_SOCKIO_H
#define ACE_HAS_SYS_SYSCALL_H
diff --git a/ACE/ace/config-sunos5.4-g++.h b/ACE/ace/config-sunos5.4-g++.h
index 931ac376113..29add00caa0 100644
--- a/ACE/ace/config-sunos5.4-g++.h
+++ b/ACE/ace/config-sunos5.4-g++.h
@@ -124,8 +124,6 @@
// Platform provides <sys/filio.h> header.
#define ACE_HAS_SYS_FILIO_H
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
#define ACE_HAS_STRSIGNAL
/* Turn off the following defines if you want to disable threading. */
diff --git a/ACE/ace/config-sunos5.4-sunc++-4.x.h b/ACE/ace/config-sunos5.4-sunc++-4.x.h
index ba4cae3f75c..5fe8e41efde 100644
--- a/ACE/ace/config-sunos5.4-sunc++-4.x.h
+++ b/ACE/ace/config-sunos5.4-sunc++-4.x.h
@@ -121,8 +121,6 @@
// Platform provides <sys/filio.h> header.
#define ACE_HAS_SYS_FILIO_H
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
#define ACE_HAS_STRSIGNAL
/* Turn off the following defines if you want to disable threading. */
diff --git a/ACE/ace/config-sunos5.5.h b/ACE/ace/config-sunos5.5.h
index 494d400efcf..6847aa16726 100644
--- a/ACE/ace/config-sunos5.5.h
+++ b/ACE/ace/config-sunos5.5.h
@@ -293,8 +293,6 @@
// Platform provides <sys/filio.h> header.
#define ACE_HAS_SYS_FILIO_H
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
#define ACE_HAS_STRSIGNAL
// SunOS 5.5.x does not support mkstemp