Merge "POSIX says sigaction::sa_flags
is int
."
This commit is contained in:
commit
5e77d57c48
2 changed files with 20 additions and 20 deletions
|
@ -37,17 +37,13 @@
|
|||
#include <bits/timespec.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if defined(__LP64__) || defined(__mips__)
|
||||
/* For 64-bit (and mips), the kernel's struct sigaction doesn't match the POSIX one,
|
||||
* so we need to expose our own and translate behind the scenes. */
|
||||
# define sigaction __kernel_sigaction
|
||||
# include <linux/signal.h>
|
||||
# undef sigaction
|
||||
#else
|
||||
/* For 32-bit, we're stuck with the definitions we already shipped,
|
||||
/* For 64-bit (and mips), the kernel's struct sigaction doesn't match the
|
||||
* POSIX one, so we need to expose our own and translate behind the scenes.
|
||||
* For 32-bit, we're stuck with the definitions we already shipped,
|
||||
* even though they contain a sigset_t that's too small. */
|
||||
# include <linux/signal.h>
|
||||
#endif
|
||||
#define sigaction __kernel_sigaction
|
||||
#include <linux/signal.h>
|
||||
#undef sigaction
|
||||
|
||||
#include <sys/ucontext.h>
|
||||
#define __BIONIC_HAVE_UCONTEXT_T
|
||||
|
@ -87,7 +83,7 @@ typedef __sighandler_t sighandler_t; /* glibc compatibility. */
|
|||
#if defined(__LP64__)
|
||||
|
||||
struct sigaction {
|
||||
unsigned int sa_flags;
|
||||
int sa_flags;
|
||||
union {
|
||||
sighandler_t sa_handler;
|
||||
void (*sa_sigaction)(int, struct siginfo*, void*);
|
||||
|
@ -99,7 +95,7 @@ struct sigaction {
|
|||
#elif defined(__mips__)
|
||||
|
||||
struct sigaction {
|
||||
unsigned int sa_flags;
|
||||
int sa_flags;
|
||||
union {
|
||||
sighandler_t sa_handler;
|
||||
void (*sa_sigaction) (int, struct siginfo*, void*);
|
||||
|
@ -107,6 +103,18 @@ struct sigaction {
|
|||
sigset_t sa_mask;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
struct sigaction {
|
||||
union {
|
||||
sighandler_t _sa_handler;
|
||||
void (*_sa_sigaction)(int, struct siginfo*, void*);
|
||||
} _u;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
void (*sa_restorer)(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
int sigaction(int __signal, const struct sigaction* __new_action, struct sigaction* __old_action);
|
||||
|
|
|
@ -103,15 +103,7 @@ static void signal_h() {
|
|||
TYPE(struct sigaction);
|
||||
STRUCT_MEMBER_FUNCTION_POINTER(struct sigaction, void (*f)(int), sa_handler);
|
||||
STRUCT_MEMBER(struct sigaction, sigset_t, sa_mask);
|
||||
#if defined(__BIONIC__)
|
||||
#if defined(__LP64__)
|
||||
STRUCT_MEMBER(struct sigaction, unsigned int, sa_flags); // TODO: easily fixed!
|
||||
#else
|
||||
STRUCT_MEMBER(struct sigaction, unsigned long, sa_flags);
|
||||
#endif
|
||||
#else
|
||||
STRUCT_MEMBER(struct sigaction, int, sa_flags);
|
||||
#endif
|
||||
STRUCT_MEMBER_FUNCTION_POINTER(struct sigaction, void (*f)(int, siginfo_t*, void*), sa_sigaction);
|
||||
|
||||
i = SIG_BLOCK;
|
||||
|
|
Loading…
Reference in a new issue