signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Dec 2010 00:53:15 +0000 (01:53 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Dec 2010 00:53:15 +0000 (01:53 +0100)
* doc/posix-headers/signal.texi: Document OSF/1 5.1 problem.
* lib/strsignal.c (strsignal): Cast SIGRTMIN to 'int'.

ChangeLog
doc/posix-headers/signal.texi
lib/strsignal.c

index 0a5f1efd38760f4c76c65b5cdb59502bc51453f9..43dc38e4197fd22880a76597a476e2cc50a08a2b 100644 (file)
--- 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.
index be62523249e4f6f8b4744f8490517f256d13843d..9056d1e3e6d968630e189c3e86e9a90aad3d7c8b 100644 (file)
@@ -35,4 +35,8 @@ Portability problems not fixed by Gnulib:
 @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
index 8cd09d2b7e30d1867c777e730bbdc810dac36364..c9c7b116219d0004bc61eace4daf1ce9d4a05ee9 100644 (file)
@@ -108,7 +108,7 @@ strsignal (int signum)
 #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"),