Move NSIG ifdefery to a separate header file
* nsig.h: New file. * Makefile.am (strace_SOURCES): Add it. * signal.c: Include "nsig.h" instead of <signal.h>, remove NSIG workarounds. * sigreturn.c: Likewise. * syscall.c: Likewise. * tests/pselect6.c: Likewise.
This commit is contained in:
parent
f91679316b
commit
5a25466437
@ -170,6 +170,7 @@ strace_SOURCES = \
|
||||
native_defs.h \
|
||||
net.c \
|
||||
netlink.c \
|
||||
nsig.h \
|
||||
numa.c \
|
||||
oldstat.c \
|
||||
open.c \
|
||||
|
13
nsig.h
Normal file
13
nsig.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef STRACE_NSIG_H
|
||||
#define STRACE_NSIG_H
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#ifndef NSIG
|
||||
# warning NSIG is not defined, using 32
|
||||
# define NSIG 32
|
||||
#elif NSIG < 32
|
||||
# error NSIG < 32
|
||||
#endif
|
||||
|
||||
#endif /* !STRACE_NSIG_H */
|
9
signal.c
9
signal.c
@ -32,14 +32,7 @@
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include <signal.h>
|
||||
|
||||
#ifndef NSIG
|
||||
# warning NSIG is not defined, using 32
|
||||
# define NSIG 32
|
||||
#elif NSIG < 32
|
||||
# error NSIG < 32
|
||||
#endif
|
||||
#include "nsig.h"
|
||||
|
||||
/* The libc headers do not define this constant since it should only be
|
||||
used by the implementation. So we define it here. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "defs.h"
|
||||
#include <signal.h>
|
||||
#include "nsig.h"
|
||||
#include "regs.h"
|
||||
#include "ptrace.h"
|
||||
|
||||
@ -7,13 +7,6 @@
|
||||
# include <asm/sigcontext.h>
|
||||
#endif
|
||||
|
||||
#ifndef NSIG
|
||||
# warning NSIG is not defined, using 32
|
||||
# define NSIG 32
|
||||
#elif NSIG < 32
|
||||
# error NSIG < 32
|
||||
#endif
|
||||
|
||||
#include "arch_sigreturn.c"
|
||||
|
||||
SYS_FUNC(sigreturn)
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
#include "defs.h"
|
||||
#include "native_defs.h"
|
||||
#include "nsig.h"
|
||||
#include <sys/param.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* for struct iovec */
|
||||
#include <sys/uio.h>
|
||||
@ -63,11 +63,6 @@
|
||||
# define NT_PRSTATUS 1
|
||||
#endif
|
||||
|
||||
#ifndef NSIG
|
||||
# warning: NSIG is not defined, using 32
|
||||
# define NSIG 32
|
||||
#endif
|
||||
|
||||
#include "syscall.h"
|
||||
|
||||
/* Define these shorthand notations to simplify the syscallent files. */
|
||||
|
@ -30,9 +30,9 @@
|
||||
*/
|
||||
|
||||
#include "tests.h"
|
||||
#include "nsig.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <asm/unistd.h>
|
||||
@ -40,11 +40,6 @@
|
||||
|
||||
#ifdef __NR_pselect6
|
||||
|
||||
#ifndef NSIG
|
||||
# warning NSIG is not defined, using 32
|
||||
# define NSIG 32
|
||||
#endif
|
||||
|
||||
static fd_set set[3][0x1000000 / sizeof(fd_set)];
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user