aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/siglist.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-06-19 12:40:14 +0000
committerRoland McGrath <roland@gnu.org>1999-06-19 12:40:14 +0000
commita901ffa236a6170adc61e0b98f5a15f675ed9462 (patch)
treea6dde15fe88b37b2bc29ce2ed1f0357c423fd596 /sysdeps/generic/siglist.c
parent79ede0e6148c6a566bc8ab3479fd4264d1ad62ba (diff)
downloadglibc-a901ffa236a6170adc61e0b98f5a15f675ed9462.tar
glibc-a901ffa236a6170adc61e0b98f5a15f675ed9462.tar.gz
glibc-a901ffa236a6170adc61e0b98f5a15f675ed9462.tar.bz2
glibc-a901ffa236a6170adc61e0b98f5a15f675ed9462.zip
* 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 <siglist.h>. 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 <roland@baalperazim.frob.com>
Diffstat (limited to 'sysdeps/generic/siglist.c')
-rw-r--r--sysdeps/generic/siglist.c41
1 files changed, 18 insertions, 23 deletions
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 <stddef.h>
+#include <signal.h>
+#include <libintl.h>
-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 <siglist.h>
+#undef init_sig
+};
+
+
+const char *const _sys_sigabbrev[NSIG] =
+{
+#define init_sig(sig, abbrev, desc) [sig] abbrev,
+#include <siglist.h>
+#undef init_sig
+};