Clean up sys_signame and sys_siglist a little.

We don't need quite so much duplication because we already have a way
to get the signal number from its name, and that already copes with the
fact that the mips/mips64 numbers are different from everyone else's.

Also remove sys_signame from LP64. glibc doesn't have this BSD-ism.

Change-Id: I6dc411a3d73589383c85d3b07d9d648311492a10
This commit is contained in:
Elliott Hughes
2014-02-11 19:57:06 -08:00
parent 9e572ca416
commit aa0ebdafc7
7 changed files with 127 additions and 131 deletions

View File

@@ -35,67 +35,41 @@
#error __BIONIC_SIGDEF not defined
#endif
__BIONIC_SIGDEF(HUP,1,"Hangup")
__BIONIC_SIGDEF(INT,2,"Interrupt")
__BIONIC_SIGDEF(QUIT,3,"Quit")
__BIONIC_SIGDEF(ILL,4,"Illegal instruction")
__BIONIC_SIGDEF(TRAP,5,"Trap")
__BIONIC_SIGDEF(ABRT,6,"Aborted")
#ifdef __mips__
__BIONIC_SIGDEF(EMT,7,"EMT")
#else
__BIONIC_SIGDEF(BUS,7,"Bus error")
__BIONIC_SIGDEF(SIGHUP, "Hangup")
__BIONIC_SIGDEF(SIGINT, "Interrupt")
__BIONIC_SIGDEF(SIGQUIT, "Quit")
__BIONIC_SIGDEF(SIGILL, "Illegal instruction")
__BIONIC_SIGDEF(SIGTRAP, "Trap")
__BIONIC_SIGDEF(SIGABRT, "Aborted")
#ifdef SIGEMT
__BIONIC_SIGDEF(SIGEMT, "EMT")
#endif
__BIONIC_SIGDEF(FPE,8,"Floating point exception")
__BIONIC_SIGDEF(KILL,9,"Killed")
#ifdef __mips__
__BIONIC_SIGDEF(BUS,10,"Bus error")
#else
__BIONIC_SIGDEF(USR1,10,"User signal 1")
#endif
__BIONIC_SIGDEF(SEGV,11,"Segmentation fault")
#ifdef __mips__
__BIONIC_SIGDEF(SYS,12,"Bad system call")
#else
__BIONIC_SIGDEF(USR2,12,"User signal 2")
#endif
__BIONIC_SIGDEF(PIPE,13,"Broken pipe")
__BIONIC_SIGDEF(ALRM,14,"Alarm clock")
__BIONIC_SIGDEF(TERM,15,"Terminated")
#ifdef __mips__
__BIONIC_SIGDEF(USR1,16,"User signal 1")
__BIONIC_SIGDEF(USR2,17,"User signal 2")
__BIONIC_SIGDEF(CHLD,18,"Child exited")
__BIONIC_SIGDEF(PWR,19,"Power failure")
__BIONIC_SIGDEF(WINCH,20,"Window size changed")
__BIONIC_SIGDEF(URG,21,"Urgent I/O condition")
__BIONIC_SIGDEF(IO,22,"I/O possible")
__BIONIC_SIGDEF(STOP,23,"Stopped (signal)")
__BIONIC_SIGDEF(TSTP,24,"Stopped")
__BIONIC_SIGDEF(CONT,25,"Continue")
__BIONIC_SIGDEF(TTIN,26,"Stopped (tty input)")
__BIONIC_SIGDEF(TTOU,27,"Stopped (tty output)")
__BIONIC_SIGDEF(VTALRM,28,"Virtual timer expired")
__BIONIC_SIGDEF(PROF,29,"Profiling timer expired")
__BIONIC_SIGDEF(XCPU,30,"CPU time limit exceeded")
__BIONIC_SIGDEF(XFSZ,31,"File size limit exceeded")
#else
__BIONIC_SIGDEF(STKFLT,16,"Stack fault")
__BIONIC_SIGDEF(CHLD,17,"Child exited")
__BIONIC_SIGDEF(CONT,18,"Continue")
__BIONIC_SIGDEF(STOP,19,"Stopped (signal)")
__BIONIC_SIGDEF(TSTP,20,"Stopped")
__BIONIC_SIGDEF(TTIN,21,"Stopped (tty input)")
__BIONIC_SIGDEF(TTOU,22,"Stopped (tty output)")
__BIONIC_SIGDEF(URG,23,"Urgent I/O condition")
__BIONIC_SIGDEF(XCPU,24,"CPU time limit exceeded")
__BIONIC_SIGDEF(XFSZ,25,"File size limit exceeded")
__BIONIC_SIGDEF(VTALRM,26,"Virtual timer expired")
__BIONIC_SIGDEF(PROF,27,"Profiling timer expired")
__BIONIC_SIGDEF(WINCH,28,"Window size changed")
__BIONIC_SIGDEF(IO,29,"I/O possible")
__BIONIC_SIGDEF(PWR,30,"Power failure")
__BIONIC_SIGDEF(SYS,31,"Bad system call")
__BIONIC_SIGDEF(SIGFPE, "Floating point exception")
__BIONIC_SIGDEF(SIGKILL, "Killed")
__BIONIC_SIGDEF(SIGBUS, "Bus error")
__BIONIC_SIGDEF(SIGSEGV, "Segmentation fault")
__BIONIC_SIGDEF(SIGPIPE, "Broken pipe")
__BIONIC_SIGDEF(SIGALRM, "Alarm clock")
__BIONIC_SIGDEF(SIGTERM, "Terminated")
__BIONIC_SIGDEF(SIGUSR1, "User signal 1")
__BIONIC_SIGDEF(SIGUSR2, "User signal 2")
__BIONIC_SIGDEF(SIGCHLD, "Child exited")
__BIONIC_SIGDEF(SIGPWR, "Power failure")
__BIONIC_SIGDEF(SIGWINCH, "Window size changed")
__BIONIC_SIGDEF(SIGURG, "Urgent I/O condition")
__BIONIC_SIGDEF(SIGIO, "I/O possible")
__BIONIC_SIGDEF(SIGSTOP, "Stopped (signal)")
__BIONIC_SIGDEF(SIGTSTP, "Stopped")
__BIONIC_SIGDEF(SIGCONT, "Continue")
__BIONIC_SIGDEF(SIGTTIN, "Stopped (tty input)")
__BIONIC_SIGDEF(SIGTTOU, "Stopped (tty output)")
__BIONIC_SIGDEF(SIGVTALRM, "Virtual timer expired")
__BIONIC_SIGDEF(SIGPROF, "Profiling timer expired")
__BIONIC_SIGDEF(SIGXCPU, "CPU time limit exceeded")
__BIONIC_SIGDEF(SIGXFSZ, "File size limit exceeded")
#if defined(SIGSTKFLT)
__BIONIC_SIGDEF(SIGSTKFLT, "Stack fault")
#endif
__BIONIC_SIGDEF(SIGSYS, "Bad system call")
#undef __BIONIC_SIGDEF