From: Bruno Haible Date: Mon, 20 Dec 2010 00:53:15 +0000 (+0100) Subject: signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1. X-Git-Tag: v0.1~3530 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=0d454676975284448e48351525664ab4e6470a3c;p=gnulib.git 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'. --- diff --git a/ChangeLog b/ChangeLog index 0a5f1efd3..43dc38e41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-12-19 Bruno Haible + 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 + sys_socket: Use POSIX compatible declarations on OSF/1 5.1. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): On OSF/1, define _POSIX_PII_SOCKET. diff --git a/doc/posix-headers/signal.texi b/doc/posix-headers/signal.texi index be6252324..9056d1e3e 100644 --- a/doc/posix-headers/signal.texi +++ b/doc/posix-headers/signal.texi @@ -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 diff --git a/lib/strsignal.c b/lib/strsignal.c index 8cd09d2b7..c9c7b1162 100644 --- a/lib/strsignal.c +++ b/lib/strsignal.c @@ -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"),