1*ace5b9b5Schristos /* $NetBSD: compat_signame.c,v 1.2 2024/01/20 14:52:45 christos Exp $ */ 25b84b398Schristos 35b84b398Schristos /* 45b84b398Schristos * Copyright (c) 1983 Regents of the University of California. 55b84b398Schristos * All rights reserved. 65b84b398Schristos * 75b84b398Schristos * Redistribution and use in source and binary forms, with or without 85b84b398Schristos * modification, are permitted provided that the following conditions 95b84b398Schristos * are met: 105b84b398Schristos * 1. Redistributions of source code must retain the above copyright 115b84b398Schristos * notice, this list of conditions and the following disclaimer. 125b84b398Schristos * 2. Redistributions in binary form must reproduce the above copyright 135b84b398Schristos * notice, this list of conditions and the following disclaimer in the 145b84b398Schristos * documentation and/or other materials provided with the distribution. 155b84b398Schristos * 3. Neither the name of the University nor the names of its contributors 165b84b398Schristos * may be used to endorse or promote products derived from this software 175b84b398Schristos * without specific prior written permission. 185b84b398Schristos * 195b84b398Schristos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 205b84b398Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 215b84b398Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 225b84b398Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 235b84b398Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 245b84b398Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 255b84b398Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 265b84b398Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 275b84b398Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 285b84b398Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 295b84b398Schristos * SUCH DAMAGE. 305b84b398Schristos */ 315b84b398Schristos 325b84b398Schristos #include <sys/cdefs.h> 335b84b398Schristos #if defined(LIBC_SCCS) && !defined(lint) 345b84b398Schristos #if 0 355b84b398Schristos static char sccsid[] = "from: @(#)siglist.c 5.6 (Berkeley) 2/23/91";*/ 365b84b398Schristos #else 37*ace5b9b5Schristos __RCSID("$NetBSD: compat_signame.c,v 1.2 2024/01/20 14:52:45 christos Exp $"); 385b84b398Schristos #endif 395b84b398Schristos #endif /* LIBC_SCCS and not lint */ 405b84b398Schristos 41*ace5b9b5Schristos #define __LIBC12_SOURCE__ 42*ace5b9b5Schristos #include <sys/time.h> 43*ace5b9b5Schristos #include <compat/sys/time.h> 44*ace5b9b5Schristos #include <signal.h> 45*ace5b9b5Schristos #include <compat/include/signal.h> 46*ace5b9b5Schristos 47*ace5b9b5Schristos #ifdef __weak_alias 48*ace5b9b5Schristos __weak_alias(sys_signame, _sys_signame) 49*ace5b9b5Schristos __weak_alias(__sys_signame, _sys_signame) 50*ace5b9b5Schristos #endif 51*ace5b9b5Schristos 525b84b398Schristos __warn_references(sys_signame, 535b84b398Schristos "warning: reference to compatibility sys_signame[]; include <signal.h> for correct reference") 545b84b398Schristos 55*ace5b9b5Schristos const char *const _sys_signame[] = { 565b84b398Schristos "Signal 0", /* 0 */ 575b84b398Schristos "HUP", /* 1 SIGHUP */ 585b84b398Schristos "INT", /* 2 SIGINT */ 595b84b398Schristos "QUIT", /* 3 SIGQUIT */ 605b84b398Schristos "ILL", /* 4 SIGILL */ 615b84b398Schristos "TRAP", /* 5 SIGTRAP */ 625b84b398Schristos "ABRT", /* 6 SIGABRT */ 635b84b398Schristos "EMT", /* 7 SIGEMT */ 645b84b398Schristos "FPE", /* 8 SIGFPE */ 655b84b398Schristos "KILL", /* 9 SIGKILL */ 665b84b398Schristos "BUS", /* 10 SIGBUS */ 675b84b398Schristos "SEGV", /* 11 SIGSEGV */ 685b84b398Schristos "SYS", /* 12 SIGSYS */ 695b84b398Schristos "PIPE", /* 13 SIGPIPE */ 705b84b398Schristos "ALRM", /* 14 SIGALRM */ 715b84b398Schristos "TERM", /* 15 SIGTERM */ 725b84b398Schristos "URG", /* 16 SIGURG */ 735b84b398Schristos "STOP", /* 17 SIGSTOP */ 745b84b398Schristos "TSTP", /* 18 SIGTSTP */ 755b84b398Schristos "CONT", /* 19 SIGCONT */ 765b84b398Schristos "CHLD", /* 20 SIGCHLD */ 775b84b398Schristos "TTIN", /* 21 SIGTTIN */ 785b84b398Schristos "TTOU", /* 22 SIGTTOU */ 795b84b398Schristos "IO", /* 23 SIGIO */ 805b84b398Schristos "XCPU", /* 24 SIGXCPU */ 815b84b398Schristos "XFSZ", /* 25 SIGXFSZ */ 825b84b398Schristos "VTALRM", /* 26 SIGVTALRM */ 835b84b398Schristos "PROF", /* 27 SIGPROF */ 845b84b398Schristos "WINCH", /* 28 SIGWINCH */ 855b84b398Schristos "INFO", /* 29 SIGINFO */ 865b84b398Schristos "USR1", /* 30 SIGUSR1 */ 875b84b398Schristos "USR2", /* 31 SIGUSR2 */ 885b84b398Schristos }; 89