add new masked cancellation mode
[musl] / src / string / strsignal.c
index f0c3db7..96bfe84 100644 (file)
@@ -1,5 +1,6 @@
 #include <signal.h>
 #include <string.h>
+#include "locale_impl.h"
 
 #if (SIGHUP == 1) && (SIGINT == 2) && (SIGQUIT == 3) && (SIGILL == 4) \
  && (SIGTRAP == 5) && (SIGABRT == 6) && (SIGBUS == 7) && (SIGFPE == 8) \
@@ -61,7 +62,7 @@ static const char strings[] =
        "Trace/breakpoint trap\0"
        "Aborted\0"
        "Bus error\0"
-       "Floating point exception\0"
+       "Arithmetic exception\0"
        "Killed\0"
        "User defined signal 1\0"
        "Segmentation fault\0"
@@ -70,7 +71,7 @@ static const char strings[] =
        "Alarm clock\0"
        "Terminated\0"
        "Stack fault\0"
-       "Child exited\0"
+       "Child process status\0"
        "Continued\0"
        "Stopped (signal)\0"
        "Stopped\0"
@@ -104,12 +105,12 @@ static const char strings[] =
 
 char *strsignal(int signum)
 {
-       char *s = (char *)strings;
+       const char *s = strings;
 
        signum = sigmap(signum);
        if (signum - 1U >= _NSIG-1) signum = 0;
 
        for (; signum--; s++) for (; *s; s++);
 
-       return s;
+       return (char *)LCTRANS_CUR(s);
 }