From a901ffa236a6170adc61e0b98f5a15f675ed9462 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 19 Jun 1999 12:40:14 +0000 Subject: * sysdeps/gnu/siglist.h: File moved to ... * sysdeps/generic/siglist.h: ... here. This file should be usable for any platform, since it just associates the SIG* macros with text names and descriptions. For any signal macros do not exist on every platform, we can use #ifdef tests here and still use this single common file for all platforms. * sysdeps/generic/siglist.c: Rewrite using . This file should be usable for all platforms after the binary compatibility stuff in the current sysdeps/gnu version is no longer required. * sysdeps/generic/Makefile: Remove rules for generating siglist.c. * sysdeps/generic/make_siglist.c: File removed. 1999-06-16 Roland McGrath --- sysdeps/generic/siglist.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'sysdeps/generic/siglist.c') diff --git a/sysdeps/generic/siglist.c b/sysdeps/generic/siglist.c index ae03b1f73c..7ee6d52030 100644 --- a/sysdeps/generic/siglist.c +++ b/sysdeps/generic/siglist.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Define list of all signal numbers and their names. + Copyright (C) 1997, 1998, 1999 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 @@ -17,26 +18,20 @@ Boston, MA 02111-1307, USA. */ #include +#include +#include -const char *const _sys_siglist[] = - { - "Signal 0", - "Aborted", - "Erroneous arithmetic operation", - "Illegal instruction", - "Interrupt", - "Invalid access to storage", - "Terminated", - "Hangup", - "Quit", - "Broken pipe", - "Killed", - "Alarm clock", - "Stopped (signal)", - "Stopped", - "Continued", - "Child exited", - "Stopped (tty input)", - "Stopped (tty output)", - NULL - }; +const char *const _sys_siglist[NSIG] = +{ +#define init_sig(sig, abbrev, desc) [sig] desc, +#include +#undef init_sig +}; + + +const char *const _sys_sigabbrev[NSIG] = +{ +#define init_sig(sig, abbrev, desc) [sig] abbrev, +#include +#undef init_sig +}; -- cgit v1.2.3