Remove bsd_signal and sysv_signal from bionic LP64.
bsd_signal was removed in POSIX 2008, sysv_signal was never POSIX. Bug: 13935372 Change-Id: I7688e5cc317247ff075dcf99b598f515fb4f15c4
This commit is contained in:
parent
8aabecf35c
commit
205dd7d9b3
|
@ -32,6 +32,7 @@
|
|||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/resource.h>
|
||||
|
@ -226,4 +227,15 @@ extern "C" wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) {
|
|||
return wcsstr(haystack, needle);
|
||||
}
|
||||
|
||||
// This was removed from POSIX 2008.
|
||||
extern "C" sighandler_t bsd_signal(int signum, sighandler_t handler) {
|
||||
return signal(signum, handler);
|
||||
}
|
||||
|
||||
// sysv_signal() was never in POSIX.
|
||||
extern sighandler_t _signal(int signum, sighandler_t handler, int flags);
|
||||
extern "C" sighandler_t sysv_signal(int signum, sighandler_t handler) {
|
||||
return _signal(signum, handler, SA_RESETHAND);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,12 @@
|
|||
|
||||
#include <signal.h>
|
||||
|
||||
static sighandler_t _signal(int signum, sighandler_t handler, int flags) {
|
||||
#ifdef __LP64__
|
||||
static
|
||||
#else
|
||||
__LIBC_HIDDEN__
|
||||
#endif
|
||||
sighandler_t _signal(int signum, sighandler_t handler, int flags) {
|
||||
struct sigaction sa;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_handler = handler;
|
||||
|
@ -41,14 +46,6 @@ static sighandler_t _signal(int signum, sighandler_t handler, int flags) {
|
|||
return (sighandler_t) sa.sa_handler;
|
||||
}
|
||||
|
||||
sighandler_t bsd_signal(int signum, sighandler_t handler) {
|
||||
sighandler_t signal(int signum, sighandler_t handler) {
|
||||
return _signal(signum, handler, SA_RESTART);
|
||||
}
|
||||
|
||||
sighandler_t sysv_signal(int signum, sighandler_t handler) {
|
||||
return _signal(signum, handler, SA_RESETHAND);
|
||||
}
|
||||
|
||||
sighandler_t signal(int signum, sighandler_t handler) {
|
||||
return bsd_signal(signum, handler);
|
||||
}
|
||||
|
|
|
@ -102,8 +102,6 @@ struct sigaction {
|
|||
extern int sigaction(int, const struct sigaction*, struct sigaction*);
|
||||
|
||||
extern sighandler_t signal(int, sighandler_t);
|
||||
extern sighandler_t bsd_signal(int, sighandler_t);
|
||||
extern sighandler_t sysv_signal(int, sighandler_t);
|
||||
|
||||
extern int siginterrupt(int, int);
|
||||
|
||||
|
|
Loading…
Reference in New Issue