summaryrefslogtreecommitdiff
path: root/system/ksh/patches/linux/posix_signals_h.diff
blob: 2d6b8cec4df9cd4b4095a4366a9520924700730d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
--- ksh-openbsd_cvs/posix_signals.h	1970-01-01 01:00:00.000000000 +0100
+++ ksh-openbsd_cvs.new/posix_signals.h	2010-04-01 21:01:24.134232647 +0200
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 1988, 1993, 1994
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by the University of
+ *      California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+	Taken from misc-utils/kill.c in the util-linux-ng package.
+	ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/
+ */
+
+#ifndef POSIX_SIGNALS_H
+#define POSIX_SIGNALS_H
+
+struct signv {
+	char *name;
+	int val;
+} sys_signame[NSIG] = {
+	/* POSIX signals */
+	{ "HUP",	SIGHUP },	/* 1 */
+	{ "INT",	SIGINT }, 	/* 2 */
+	{ "QUIT",	SIGQUIT }, 	/* 3 */
+	{ "ILL",	SIGILL }, 	/* 4 */
+	{ "ABRT",	SIGABRT }, 	/* 6 */
+	{ "FPE",	SIGFPE }, 	/* 8 */
+	{ "KILL",	SIGKILL }, 	/* 9 */
+	{ "SEGV",	SIGSEGV }, 	/* 11 */
+	{ "PIPE",	SIGPIPE }, 	/* 13 */
+	{ "ALRM",	SIGALRM }, 	/* 14 */
+	{ "TERM",	SIGTERM }, 	/* 15 */
+	{ "USR1",	SIGUSR1 }, 	/* 10 (arm,i386,m68k,ppc), 30 (alpha,sparc*), 16 (mips) */
+	{ "USR2",	SIGUSR2 }, 	/* 12 (arm,i386,m68k,ppc), 31 (alpha,sparc*), 17 (mips) */
+	{ "CHLD",	SIGCHLD }, 	/* 17 (arm,i386,m68k,ppc), 20 (alpha,sparc*), 18 (mips) */
+	{ "CONT",	SIGCONT }, 	/* 18 (arm,i386,m68k,ppc), 19 (alpha,sparc*), 25 (mips) */
+	{ "STOP",	SIGSTOP },	/* 19 (arm,i386,m68k,ppc), 17 (alpha,sparc*), 23 (mips) */
+	{ "TSTP",	SIGTSTP },	/* 20 (arm,i386,m68k,ppc), 18 (alpha,sparc*), 24 (mips) */
+	{ "TTIN",	SIGTTIN },	/* 21 (arm,i386,m68k,ppc,alpha,sparc*), 26 (mips) */
+	{ "TTOU",	SIGTTOU },	/* 22 (arm,i386,m68k,ppc,alpha,sparc*), 27 (mips) */
+	/* Miscellaneous other signals */
+#ifdef SIGTRAP
+	{ "TRAP",	SIGTRAP },	/* 5 */
+#endif
+#ifdef SIGIOT
+	{ "IOT",	SIGIOT }, 	/* 6, same as SIGABRT */
+#endif
+#ifdef SIGEMT
+	{ "EMT",	SIGEMT }, 	/* 7 (mips,alpha,sparc*) */
+#endif
+#ifdef SIGBUS
+	{ "BUS",	SIGBUS },	/* 7 (arm,i386,m68k,ppc), 10 (mips,alpha,sparc*) */
+#endif
+#ifdef SIGSYS
+	{ "SYS",	SIGSYS }, 	/* 12 (mips,alpha,sparc*) */
+#endif
+#ifdef SIGSTKFLT
+	{ "STKFLT",	SIGSTKFLT },	/* 16 (arm,i386,m68k,ppc) */
+#endif
+#ifdef SIGURG
+	{ "URG",	SIGURG },	/* 23 (arm,i386,m68k,ppc), 16 (alpha,sparc*), 21 (mips) */
+#endif
+#ifdef SIGIO
+	{ "IO",		SIGIO },	/* 29 (arm,i386,m68k,ppc), 23 (alpha,sparc*), 22 (mips) */
+#endif
+#ifdef SIGPOLL
+	{ "POLL",	SIGPOLL },	/* same as SIGIO */
+#endif
+#ifdef SIGCLD
+	{ "CLD",	SIGCLD },	/* same as SIGCHLD (mips) */
+#endif
+#ifdef SIGXCPU
+	{ "XCPU",	SIGXCPU },	/* 24 (arm,i386,m68k,ppc,alpha,sparc*), 30 (mips) */
+#endif
+#ifdef SIGXFSZ
+	{ "XFSZ",	SIGXFSZ },	/* 25 (arm,i386,m68k,ppc,alpha,sparc*), 31 (mips) */
+#endif
+#ifdef SIGVTALRM
+	{ "VTALRM",	SIGVTALRM },	/* 26 (arm,i386,m68k,ppc,alpha,sparc*), 28 (mips) */
+#endif
+#ifdef SIGPROF
+	{ "PROF",	SIGPROF },	/* 27 (arm,i386,m68k,ppc,alpha,sparc*), 29 (mips) */
+#endif
+#ifdef SIGPWR
+	{ "PWR",	SIGPWR },	/* 30 (arm,i386,m68k,ppc), 29 (alpha,sparc*), 19 (mips) */
+#endif
+#ifdef SIGINFO
+	{ "INFO",	SIGINFO },	/* 29 (alpha) */
+#endif
+#ifdef SIGLOST
+	{ "LOST",	SIGLOST }, 	/* 29 (arm,i386,m68k,ppc,sparc*) */
+#endif
+#ifdef SIGWINCH
+	{ "WINCH",	SIGWINCH },	/* 28 (arm,i386,m68k,ppc,alpha,sparc*), 20 (mips) */
+#endif
+#ifdef SIGUNUSED
+	{ "UNUSED",	SIGUNUSED },	/* 31 (arm,i386,m68k,ppc) */
+#endif
+}; /* sys_signame[] */
+
+#endif /* POSIX_SIGNALS_H */