mescc: Support GNU make with POSIX.
* include/linux/x86/syscall.h (SYS_sigprocmask): New macro. * include/linux/x86_64/syscall.h (SYS_rt_sigprocmask): New macro. * include/signal.h (SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK): New macro. (sigprocmask): Declare. * lib/linux/gnu.c (sigprocmask): New function.
This commit is contained in:
parent
9ecc11ee52
commit
68441476e0
|
@ -79,4 +79,7 @@
|
|||
#define SYS_getegid 0x32
|
||||
#define SYS_setgid 0x3e
|
||||
|
||||
// make+POSIX
|
||||
#define SYS_sigprocmask 0x7e
|
||||
|
||||
#endif // __MES_LINUX_X86_SYSCALL_H
|
||||
|
|
|
@ -75,4 +75,7 @@
|
|||
#define SYS_geteuid 0x6b
|
||||
#define SYS_getegid 0x6c
|
||||
|
||||
// make+POSIX
|
||||
#define SYS_rt_sigprocmask 0x0e
|
||||
|
||||
#endif // __MES_LINUX_X86_64_SYSCALL_H
|
||||
|
|
|
@ -228,6 +228,12 @@ void* signal (int signum, void * action);
|
|||
sighandler_t signal (int signum, sighandler_t action);
|
||||
#endif
|
||||
int sigemptyset (sigset_t *set);
|
||||
#ifndef SIG_BLOCK
|
||||
#define SIG_BLOCK 0
|
||||
#define SIG_UNBLOCK 1
|
||||
#define SIG_SETMASK 2
|
||||
#endif
|
||||
int sigprocmask (int how, sigset_t const *set, sigset_t *oldset);
|
||||
|
||||
#endif //! WITH_GLIBC
|
||||
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
|
||||
#else // ! WITH_GLIBC
|
||||
|
||||
#if defined (BOOTSTRAP_WITH_POSIX)
|
||||
#define _POSIX_VERSION 199009L
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifndef NULL
|
||||
|
|
|
@ -198,3 +198,14 @@ setgid (gid_t newgid)
|
|||
{
|
||||
return _sys_call1 (SYS_setgid, (long)newgid);
|
||||
}
|
||||
|
||||
// make+POSIX
|
||||
int
|
||||
sigprocmask (int how, sigset_t const *set, sigset_t *oldset)
|
||||
{
|
||||
#if __i386__
|
||||
return _sys_call3 (SYS_sigprocmask, (long)how, (long)set, (long)oldset);
|
||||
#else
|
||||
return _sys_call3 (SYS_rt_sigprocmask, (long)how, (long)set, (long)oldset);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue