40{
41 const char *result;
42
43 /*
44 * If we have strsignal(3), use that --- but check its result for NULL.
45 */
46#ifdef HAVE_STRSIGNAL
47 result = strsignal(signum);
48 if (result == NULL)
49 result = "unrecognized signal";
50#else
51
52 /*
53 * We used to have code here to try to use sys_siglist[] if available.
54 * However, it seems that all platforms with sys_siglist[] have also had
55 * strsignal() for many years now, so that was just a waste of code.
56 */
57 result = "(signal names not available on this platform)";
58#endif
59
60 return result;
61}