changeset 13957:4efda5bffbf3

signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1. * doc/posix-headers/signal.texi: Document OSF/1 5.1 problem. * lib/strsignal.c (strsignal): Cast SIGRTMIN to 'int'.
author Bruno Haible <bruno@clisp.org>
date Mon, 20 Dec 2010 01:53:15 +0100
parents 318a73c424b0
children eaaa26453720
files ChangeLog doc/posix-headers/signal.texi lib/strsignal.c
diffstat 3 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-19  Bruno Haible  <bruno@clisp.org>
+
+	signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1.
+	* doc/posix-headers/signal.texi: Document OSF/1 5.1 problem.
+	* lib/strsignal.c (strsignal): Cast SIGRTMIN to 'int'.
+
 2010-12-19  Bruno Haible  <bruno@clisp.org>
 
 	sys_socket: Use POSIX compatible declarations on OSF/1 5.1.
--- a/doc/posix-headers/signal.texi
+++ b/doc/posix-headers/signal.texi
@@ -35,4 +35,8 @@
 @item
 Many signals are not defined on some platforms:
 mingw.
+@item
+The macros @code{SIGRTMIN} and @code{SIGRTMAX} expand to an expression of type
+@code{long} instead of @code{int} on some platforms:
+OSF/1 5.1.
 @end itemize
--- a/lib/strsignal.c
+++ b/lib/strsignal.c
@@ -108,7 +108,7 @@
 #ifdef SIGRTMIN
       if (signum >= SIGRTMIN && signum <= SIGRTMAX)
         len = __snprintf (buffer, BUFFERSIZ - 1, _("Real-time signal %d"),
-                          signum - SIGRTMIN);
+                          signum - (int) SIGRTMIN);
       else
 #endif
         len = __snprintf (buffer, BUFFERSIZ - 1, _("Unknown signal %d"),