Replace HAVE_GETRVAL2 with HAVE_ARCH_GETRVAL2
* linux/arch_defs_.h [!HAVE_ARCH_GETRVAL2] (HAVE_ARCH_GETRVAL2): New macro. * linux/alpha/arch_defs_.h: New file. * linux/ia64/arch_defs_.h: Likewise. * linux/mips/arch_defs_.h: Likewise. * linux/sh/arch_defs_.h: Likewise. * linux/sparc/arch_defs_.h: Likewise. * linux/sparc64/arch_defs_.h: Likewise. * Makefile.am (EXTRA_DIST): Add them. * defs.h (HAVE_GETRVAL2): Remove. (getrval2): Check for HAVE_ARCH_GETRVAL2 instead of arch checks. * net.c (SYS_FUNC(pipe)): Check for HAVE_ARCH_GETRVAL2 instead of HAVE_GETRVAL2. * syscall.c: Likewise.
This commit is contained in:
parent
11540211f5
commit
a9b7fb4f73
@ -405,6 +405,7 @@ EXTRA_DIST = \
|
||||
linux/aarch64/signalent1.h \
|
||||
linux/aarch64/syscallent.h \
|
||||
linux/aarch64/syscallent1.h \
|
||||
linux/alpha/arch_defs_.h \
|
||||
linux/alpha/arch_getrval2.c \
|
||||
linux/alpha/arch_regs.c \
|
||||
linux/alpha/arch_regs.h \
|
||||
@ -535,6 +536,7 @@ EXTRA_DIST = \
|
||||
linux/i386/syscallent.h \
|
||||
linux/i386/userent.h \
|
||||
linux/i386/userent0.h \
|
||||
linux/ia64/arch_defs_.h \
|
||||
linux/ia64/arch_getrval2.c \
|
||||
linux/ia64/arch_regs.c \
|
||||
linux/ia64/arch_regs.h \
|
||||
@ -589,6 +591,7 @@ EXTRA_DIST = \
|
||||
linux/microblaze/set_scno.c \
|
||||
linux/microblaze/syscallent.h \
|
||||
linux/microblaze/userent.h \
|
||||
linux/mips/arch_defs_.h \
|
||||
linux/mips/arch_getrval2.c \
|
||||
linux/mips/arch_regs.c \
|
||||
linux/mips/arch_regs.h \
|
||||
@ -728,6 +731,7 @@ EXTRA_DIST = \
|
||||
linux/s390x/syscallent.h \
|
||||
linux/s390x/syscallent1.h \
|
||||
linux/s390x/userent.h \
|
||||
linux/sh/arch_defs_.h \
|
||||
linux/sh/arch_getrval2.c \
|
||||
linux/sh/arch_regs.c \
|
||||
linux/sh/arch_rt_sigframe.c \
|
||||
@ -759,6 +763,7 @@ EXTRA_DIST = \
|
||||
linux/signalent.h \
|
||||
linux/smc_diag.h \
|
||||
linux/sock_diag.h \
|
||||
linux/sparc/arch_defs_.h \
|
||||
linux/sparc/arch_getrval2.c \
|
||||
linux/sparc/arch_regs.c \
|
||||
linux/sparc/arch_regs.h \
|
||||
@ -777,6 +782,7 @@ EXTRA_DIST = \
|
||||
linux/sparc/signalent.h \
|
||||
linux/sparc/syscallent.h \
|
||||
linux/sparc/userent.h \
|
||||
linux/sparc64/arch_defs_.h \
|
||||
linux/sparc64/arch_getrval2.c \
|
||||
linux/sparc64/arch_regs.c \
|
||||
linux/sparc64/arch_regs.h \
|
||||
|
6
defs.h
6
defs.h
@ -479,12 +479,8 @@ print_array(struct tcb *,
|
||||
void *opaque_data),
|
||||
void *opaque_data);
|
||||
|
||||
#if defined ALPHA || defined IA64 || defined MIPS \
|
||||
|| defined SH || defined SPARC || defined SPARC64
|
||||
# define HAVE_GETRVAL2
|
||||
#if HAVE_ARCH_GETRVAL2
|
||||
extern long getrval2(struct tcb *);
|
||||
#else
|
||||
# undef HAVE_GETRVAL2
|
||||
#endif
|
||||
|
||||
extern const char *signame(const int);
|
||||
|
1
linux/alpha/arch_defs_.h
Normal file
1
linux/alpha/arch_defs_.h
Normal file
@ -0,0 +1 @@
|
||||
#define HAVE_ARCH_GETRVAL2 1
|
@ -1,5 +1,9 @@
|
||||
/* Fallback file for arch-specific definitions. */
|
||||
|
||||
#ifndef HAVE_ARCH_GETRVAL2
|
||||
# define HAVE_ARCH_GETRVAL2 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_OLD_MMAP
|
||||
# define HAVE_ARCH_OLD_MMAP 0
|
||||
#endif
|
||||
|
1
linux/ia64/arch_defs_.h
Normal file
1
linux/ia64/arch_defs_.h
Normal file
@ -0,0 +1 @@
|
||||
#define HAVE_ARCH_GETRVAL2 1
|
1
linux/mips/arch_defs_.h
Normal file
1
linux/mips/arch_defs_.h
Normal file
@ -0,0 +1 @@
|
||||
#define HAVE_ARCH_GETRVAL2 1
|
1
linux/sh/arch_defs_.h
Normal file
1
linux/sh/arch_defs_.h
Normal file
@ -0,0 +1 @@
|
||||
#define HAVE_ARCH_GETRVAL2 1
|
1
linux/sparc/arch_defs_.h
Normal file
1
linux/sparc/arch_defs_.h
Normal file
@ -0,0 +1 @@
|
||||
#define HAVE_ARCH_GETRVAL2 1
|
1
linux/sparc64/arch_defs_.h
Normal file
1
linux/sparc64/arch_defs_.h
Normal file
@ -0,0 +1 @@
|
||||
#define HAVE_ARCH_GETRVAL2 1
|
2
net.c
2
net.c
@ -354,7 +354,7 @@ do_pipe(struct tcb *tcp, int flags_arg)
|
||||
|
||||
SYS_FUNC(pipe)
|
||||
{
|
||||
#ifdef HAVE_GETRVAL2
|
||||
#if HAVE_ARCH_GETRVAL2
|
||||
if (exiting(tcp) && !syserror(tcp))
|
||||
printpair_fd(tcp, tcp->u_rval, getrval2(tcp));
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user