]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdio-common/psiginfo.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / stdio-common / psiginfo.c
index 627c21c6403dfd91ffc79ca4ccd4f95ba5efcf88..3aff5012d3ec1ffe8162b772b6be07a8b8d63493 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
 #include <libintl.h>
 #include <not-cancel.h>
 
 
-/* Defined in sys_siglist.c.  */
-extern const char *const _sys_siglist[];
-extern const char *const _sys_siglist_internal[] attribute_hidden;
-
-
 #define MF(l) MF1 (l)
 #define MF1(l) str_##l
 #define C(s1, s2) C1 (s1, s2)
@@ -85,9 +79,13 @@ psiginfo (const siginfo_t *pinfo, const char *s)
 
   const char *desc;
   if (pinfo->si_signo >= 0 && pinfo->si_signo < NSIG
-      && ((desc = INTUSE(_sys_siglist)[pinfo->si_signo]) != NULL
-         || (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX)))
+      && ((desc = _sys_siglist[pinfo->si_signo]) != NULL
+#ifdef SIGRTMIN
+         || (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX)
+#endif
+        ))
     {
+#ifdef SIGRTMIN
       if (desc == NULL)
        {
          if (pinfo->si_signo - SIGRTMIN < SIGRTMAX - pinfo->si_signo)
@@ -106,6 +104,7 @@ psiginfo (const siginfo_t *pinfo, const char *s)
            }
        }
       else
+#endif
        fprintf (fp, "%s (", _(desc));
 
       const char *base = NULL;