diff options
| author | Stephen Rothwell <sfr@canb.auug.org.au> | 2002-05-30 20:36:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-05-30 20:36:47 -0700 |
| commit | cdf24f56978fd172bb803b8d50ba150c5afca566 (patch) | |
| tree | 981928ee6b5ec1dfd0eec0dc47612c2b835d4b3f /include | |
| parent | e42d8b3e8e40b30426aa2133ee2b09850c33dc76 (diff) | |
[PATCH] missing bit from signal patches
The following should allow the affected architectures to build in
2.5.19 as currently there will be two definitions of
copy_siginfo_to_user and if an architecture defines its own
siginfo_t it MUST define copy_siginfo().
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/siginfo.h | 1 | ||||
| -rw-r--r-- | include/asm-cris/siginfo.h | 2 | ||||
| -rw-r--r-- | include/asm-ia64/siginfo.h | 2 | ||||
| -rw-r--r-- | include/asm-m68k/siginfo.h | 16 | ||||
| -rw-r--r-- | include/asm-mips/siginfo.h | 17 | ||||
| -rw-r--r-- | include/asm-mips64/siginfo.h | 17 | ||||
| -rw-r--r-- | include/asm-parisc/siginfo.h | 2 | ||||
| -rw-r--r-- | include/asm-sparc/siginfo.h | 1 | ||||
| -rw-r--r-- | include/asm-sparc64/siginfo.h | 2 |
9 files changed, 57 insertions, 3 deletions
diff --git a/include/asm-alpha/siginfo.h b/include/asm-alpha/siginfo.h index 7f54a8019e10..42eb85ee5760 100644 --- a/include/asm-alpha/siginfo.h +++ b/include/asm-alpha/siginfo.h @@ -6,6 +6,7 @@ #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) #define HAVE_ARCH_COPY_SIGINFO +#define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h> diff --git a/include/asm-cris/siginfo.h b/include/asm-cris/siginfo.h index c1cd6d16928b..a8c8c74dc9df 100644 --- a/include/asm-cris/siginfo.h +++ b/include/asm-cris/siginfo.h @@ -1,6 +1,8 @@ #ifndef _CRIS_SIGINFO_H #define _CRIS_SIGINFO_H +#define HAVE_ARCH_COPY_SIGINFO_TO_USER + #include <asm-generic/siginfo.h> #endif diff --git a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h index 947230fc3c1b..57addd404638 100644 --- a/include/asm-ia64/siginfo.h +++ b/include/asm-ia64/siginfo.h @@ -11,8 +11,8 @@ #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) #define HAVE_ARCH_SIGINFO_T - #define HAVE_ARCH_COPY_SIGINFO +#define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h> diff --git a/include/asm-m68k/siginfo.h b/include/asm-m68k/siginfo.h index 6c795eb3cf4e..bedd92cb4a9e 100644 --- a/include/asm-m68k/siginfo.h +++ b/include/asm-m68k/siginfo.h @@ -2,6 +2,7 @@ #define _M68K_SIGINFO_H #define HAVE_ARCH_SIGINFO_T +#define HAVE_ARCH_COPY_SIGINFO #include <asm-generic/siginfo.h> @@ -68,6 +69,21 @@ typedef struct siginfo { #define si_uid16 _sifields._kill._uid #else #define si_uid _sifields._kill._uid +#endif + +#ifdef __KERNEL__ + +#include <linux/string.h> + +static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) +{ + if (from->si_code < 0) + memcpy(to, from, sizeof(*to)); + else + /* _sigchld is currently the largest know union member */ + memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); +} + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index b82c8907a572..3f45c60f5948 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h @@ -12,8 +12,8 @@ #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) #define HAVE_ARCH_SIGINFO_T - #define HAVE_ARCH_SIGEVENT_T +#define HAVE_ARCH_COPY_SIGINFO #include <asm-generic/siginfo.h> @@ -122,4 +122,19 @@ typedef struct sigevent { } _sigev_un; } sigevent_t; +#ifdef __KERNEL__ + +#include <linux/string.h> + +static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) +{ + if (from->si_code < 0) + memcpy(to, from, sizeof(*to)); + else + /* _sigchld is currently the largest know union member */ + memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); +} + +#endif + #endif /* _ASM_SIGINFO_H */ diff --git a/include/asm-mips64/siginfo.h b/include/asm-mips64/siginfo.h index d8ea2289cdd2..725fe4ea85ee 100644 --- a/include/asm-mips64/siginfo.h +++ b/include/asm-mips64/siginfo.h @@ -13,6 +13,8 @@ #define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_SIGEVENT_T +#define HAVE_ARCH_COPY_SIGINFO +#define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h> @@ -121,4 +123,19 @@ typedef struct sigevent { } _sigev_un; } sigevent_t; +#ifdef __KERNEL__ + +#include <linux/string.h> + +static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) +{ + if (from->si_code < 0) + memcpy(to, from, sizeof(*to)); + else + /* _sigchld is currently the largest know union member */ + memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); +} + +#endif + #endif /* _ASM_SIGINFO_H */ diff --git a/include/asm-parisc/siginfo.h b/include/asm-parisc/siginfo.h index d4909f55fe35..da7dbc4dba93 100644 --- a/include/asm-parisc/siginfo.h +++ b/include/asm-parisc/siginfo.h @@ -1,6 +1,8 @@ #ifndef _PARISC_SIGINFO_H #define _PARISC_SIGINFO_H +#define HAVE_ARCH_COPY_SIGINFO_TO_USER + #include <asm-generic/siginfo.h> /* diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h index 4f74361442d3..b5127b06416f 100644 --- a/include/asm-sparc/siginfo.h +++ b/include/asm-sparc/siginfo.h @@ -7,6 +7,7 @@ #define HAVE_ARCH_SIGINFO_T #define HAVE_ARCH_COPY_SIGINFO +#define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h> diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h index 6a5f71e8f2e9..ff760c478463 100644 --- a/include/asm-sparc64/siginfo.h +++ b/include/asm-sparc64/siginfo.h @@ -8,8 +8,8 @@ #define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3) #define HAVE_ARCH_SIGINFO_T - #define HAVE_ARCH_COPY_SIGINFO +#define HAVE_ARCH_COPY_SIGINFO_TO_USER #include <asm-generic/siginfo.h> |
