xref: /minix3/lib/libc/gen/signame.c (revision 2fe8fb192fe7e8720e3e7a77f928da545e872a6a)
1*2fe8fb19SBen Gras /*	$NetBSD: signame.c,v 1.13 2005/09/13 01:44:09 christos Exp $	*/
2*2fe8fb19SBen Gras 
3*2fe8fb19SBen Gras /*
4*2fe8fb19SBen Gras  * Copyright (c) 1983 Regents of the University of California.
5*2fe8fb19SBen Gras  * All rights reserved.
6*2fe8fb19SBen Gras  *
7*2fe8fb19SBen Gras  * Redistribution and use in source and binary forms, with or without
8*2fe8fb19SBen Gras  * modification, are permitted provided that the following conditions
9*2fe8fb19SBen Gras  * are met:
10*2fe8fb19SBen Gras  * 1. Redistributions of source code must retain the above copyright
11*2fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer.
12*2fe8fb19SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
13*2fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer in the
14*2fe8fb19SBen Gras  *    documentation and/or other materials provided with the distribution.
15*2fe8fb19SBen Gras  * 3. Neither the name of the University nor the names of its contributors
16*2fe8fb19SBen Gras  *    may be used to endorse or promote products derived from this software
17*2fe8fb19SBen Gras  *    without specific prior written permission.
18*2fe8fb19SBen Gras  *
19*2fe8fb19SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20*2fe8fb19SBen Gras  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21*2fe8fb19SBen Gras  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22*2fe8fb19SBen Gras  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23*2fe8fb19SBen Gras  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24*2fe8fb19SBen Gras  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25*2fe8fb19SBen Gras  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26*2fe8fb19SBen Gras  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27*2fe8fb19SBen Gras  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28*2fe8fb19SBen Gras  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29*2fe8fb19SBen Gras  * SUCH DAMAGE.
30*2fe8fb19SBen Gras  */
31*2fe8fb19SBen Gras 
32*2fe8fb19SBen Gras #include <sys/cdefs.h>
33*2fe8fb19SBen Gras #if defined(LIBC_SCCS) && !defined(lint)
34*2fe8fb19SBen Gras #if 0
35*2fe8fb19SBen Gras static char sccsid[] = "from: @(#)siglist.c	5.6 (Berkeley) 2/23/91";*/
36*2fe8fb19SBen Gras #else
37*2fe8fb19SBen Gras __RCSID("$NetBSD: signame.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
38*2fe8fb19SBen Gras #endif
39*2fe8fb19SBen Gras #endif /* LIBC_SCCS and not lint */
40*2fe8fb19SBen Gras 
41*2fe8fb19SBen Gras #include <signal.h>
42*2fe8fb19SBen Gras #include <unistd.h>
43*2fe8fb19SBen Gras 
44*2fe8fb19SBen Gras static const char *const __signame14[] = {
45*2fe8fb19SBen Gras 	"Signal 0",	/* 0 */
46*2fe8fb19SBen Gras 	"HUP",		/* 1 SIGHUP */
47*2fe8fb19SBen Gras 	"INT",		/* 2 SIGINT */
48*2fe8fb19SBen Gras 	"QUIT",		/* 3 SIGQUIT */
49*2fe8fb19SBen Gras 	"ILL",		/* 4 SIGILL */
50*2fe8fb19SBen Gras 	"TRAP",		/* 5 SIGTRAP */
51*2fe8fb19SBen Gras 	"ABRT",		/* 6 SIGABRT */
52*2fe8fb19SBen Gras 	"EMT",		/* 7 SIGEMT */
53*2fe8fb19SBen Gras 	"FPE",		/* 8 SIGFPE */
54*2fe8fb19SBen Gras 	"KILL",		/* 9 SIGKILL */
55*2fe8fb19SBen Gras 	"BUS",		/* 10 SIGBUS */
56*2fe8fb19SBen Gras 	"SEGV",		/* 11 SIGSEGV */
57*2fe8fb19SBen Gras 	"SYS",		/* 12 SIGSYS */
58*2fe8fb19SBen Gras 	"PIPE",		/* 13 SIGPIPE */
59*2fe8fb19SBen Gras 	"ALRM",		/* 14 SIGALRM */
60*2fe8fb19SBen Gras 	"TERM",		/* 15 SIGTERM */
61*2fe8fb19SBen Gras 	"URG",		/* 16 SIGURG */
62*2fe8fb19SBen Gras 	"STOP",		/* 17 SIGSTOP */
63*2fe8fb19SBen Gras 	"TSTP",		/* 18 SIGTSTP */
64*2fe8fb19SBen Gras 	"CONT",		/* 19 SIGCONT */
65*2fe8fb19SBen Gras 	"CHLD",		/* 20 SIGCHLD */
66*2fe8fb19SBen Gras 	"TTIN",		/* 21 SIGTTIN */
67*2fe8fb19SBen Gras 	"TTOU",		/* 22 SIGTTOU */
68*2fe8fb19SBen Gras 	"IO",		/* 23 SIGIO */
69*2fe8fb19SBen Gras 	"XCPU",		/* 24 SIGXCPU */
70*2fe8fb19SBen Gras 	"XFSZ",		/* 25 SIGXFSZ */
71*2fe8fb19SBen Gras 	"VTALRM",	/* 26 SIGVTALRM */
72*2fe8fb19SBen Gras 	"PROF",		/* 27 SIGPROF */
73*2fe8fb19SBen Gras 	"WINCH",	/* 28 SIGWINCH */
74*2fe8fb19SBen Gras 	"INFO",		/* 29 SIGINFO */
75*2fe8fb19SBen Gras 	"USR1",		/* 30 SIGUSR1 */
76*2fe8fb19SBen Gras 	"USR2",		/* 31 SIGUSR2 */
77*2fe8fb19SBen Gras 	"PWR",		/* 32 SIGPWR */
78*2fe8fb19SBen Gras 	"RT0",		/* 33 SIGRTMIN + 0 */
79*2fe8fb19SBen Gras 	"RT1",		/* 34 SIGRTMIN + 1 */
80*2fe8fb19SBen Gras 	"RT2",		/* 35 SIGRTMIN + 2 */
81*2fe8fb19SBen Gras 	"RT3",		/* 36 SIGRTMIN + 3 */
82*2fe8fb19SBen Gras 	"RT4",		/* 37 SIGRTMIN + 4 */
83*2fe8fb19SBen Gras 	"RT5",		/* 38 SIGRTMIN + 5 */
84*2fe8fb19SBen Gras 	"RT6",		/* 39 SIGRTMIN + 6 */
85*2fe8fb19SBen Gras 	"RT7",		/* 40 SIGRTMIN + 7 */
86*2fe8fb19SBen Gras 	"RT8",		/* 41 SIGRTMIN + 8 */
87*2fe8fb19SBen Gras 	"RT9",		/* 42 SIGRTMIN + 9 */
88*2fe8fb19SBen Gras 	"RT10",		/* 43 SIGRTMIN + 10 */
89*2fe8fb19SBen Gras 	"RT11",		/* 44 SIGRTMIN + 11 */
90*2fe8fb19SBen Gras 	"RT12",		/* 45 SIGRTMIN + 12 */
91*2fe8fb19SBen Gras 	"RT13",		/* 46 SIGRTMIN + 13 */
92*2fe8fb19SBen Gras 	"RT14",		/* 47 SIGRTMIN + 14 */
93*2fe8fb19SBen Gras 	"RT15",		/* 48 SIGRTMIN + 15 */
94*2fe8fb19SBen Gras 	"RT16",		/* 49 SIGRTMIN + 16 */
95*2fe8fb19SBen Gras 	"RT17",		/* 50 SIGRTMIN + 17 */
96*2fe8fb19SBen Gras 	"RT18",		/* 51 SIGRTMIN + 18 */
97*2fe8fb19SBen Gras 	"RT19",		/* 52 SIGRTMIN + 19 */
98*2fe8fb19SBen Gras 	"RT20",		/* 53 SIGRTMIN + 20 */
99*2fe8fb19SBen Gras 	"RT21",		/* 54 SIGRTMIN + 21 */
100*2fe8fb19SBen Gras 	"RT22",		/* 55 SIGRTMIN + 22 */
101*2fe8fb19SBen Gras 	"RT23",		/* 56 SIGRTMIN + 23 */
102*2fe8fb19SBen Gras 	"RT24",		/* 57 SIGRTMIN + 24 */
103*2fe8fb19SBen Gras 	"RT25",		/* 58 SIGRTMIN + 25 */
104*2fe8fb19SBen Gras 	"RT26",		/* 59 SIGRTMIN + 26 */
105*2fe8fb19SBen Gras 	"RT27",		/* 60 SIGRTMIN + 27 */
106*2fe8fb19SBen Gras 	"RT28",		/* 61 SIGRTMIN + 28 */
107*2fe8fb19SBen Gras 	"RT29",		/* 62 SIGRTMIN + 29 */
108*2fe8fb19SBen Gras 	"RT30",		/* 63 SIGRTMIN + 30 */
109*2fe8fb19SBen Gras };
110*2fe8fb19SBen Gras 
111*2fe8fb19SBen Gras const char * const *__sys_signame14 = __signame14;
112