* elf/elf.h: Revert last change.
[glibc.git] / sysdeps / generic / signame.h
blobd829e860b4b36482c377e4c535a3f360e365b033
1 /* Convert between signal names and numbers.
2 Copyright (C) 1990, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #if defined (__STDC__) && __STDC__
22 /* Initialize `sys_siglist'. */
23 void signame_init (void);
25 /* Return the abbreviation (e.g. ABRT, FPE, etc.) for signal NUMBER.
26 Do not return this as a const char *. The caller might want to
27 assign it to a char *. */
28 char *sig_abbrev (int number);
30 /* Return the signal number for an ABBREV, or -1 if there is no
31 signal by that name. */
32 int sig_number (const char *abbrev);
34 /* Avoid conflicts with a system header file that might define these three. */
36 #ifndef HAVE_PSIGNAL
37 /* Print to standard error the name of SIGNAL, preceded by MESSAGE and
38 a colon, and followed by a newline. */
39 void psignal (int signal, const char *message);
40 #endif
42 #ifndef HAVE_STRSIGNAL
43 /* Return the name of SIGNAL. */
44 char *strsignal (int signal);
45 #endif
47 #if !defined (HAVE_SYS_SIGLIST)
48 /* Names for signals from 0 to NSIG-1. */
49 extern const char *sys_siglist[];
50 #endif
52 #else
54 void signame_init ();
55 char *sig_abbrev ();
56 int sig_number ();
57 #if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL)
58 void psignal ();
59 #endif
60 #ifndef HAVE_STRSIGNAL
61 char *strsignal ();
62 #endif
63 #if !defined (HAVE_SYS_SIGLIST)
64 extern char *sys_siglist[];
65 #endif
67 #endif