]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] missing bit from signal patches
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 31 May 2002 03:36:47 +0000 (20:36 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 31 May 2002 03:36:47 +0000 (20:36 -0700)
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().

include/asm-alpha/siginfo.h
include/asm-cris/siginfo.h
include/asm-ia64/siginfo.h
include/asm-m68k/siginfo.h
include/asm-mips/siginfo.h
include/asm-mips64/siginfo.h
include/asm-parisc/siginfo.h
include/asm-sparc/siginfo.h
include/asm-sparc64/siginfo.h

index 7f54a8019e103c7a0cc55f4d9d823c921137bed9..42eb85ee57600a885f8b3d592a24fa71ab2acabc 100644 (file)
@@ -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>
 
index c1cd6d16928b4dbf974334dd6db1c3e175aa2f70..a8c8c74dc9df4f30943b9dd36360014121a6ff42 100644 (file)
@@ -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
index 947230fc3c1b8285fe23deeadb058d9a13acc9e5..57addd404638537084751073754759e03abfcb0a 100644 (file)
@@ -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>
 
index 6c795eb3cf4e0a9c217338940c63b23dc5d14351..bedd92cb4a9e2da79a4c0f348aa4ea58be5b6b0c 100644 (file)
@@ -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
index b82c8907a572602e2481b6c8f8a3cc17735f03ca..3f45c60f594891cfebe298d311e069c707d9a73f 100644 (file)
@@ -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 */
index d8ea2289cdd240041027e95242145655b40f79ad..725fe4ea85ee77667998317b248961b81d6a5119 100644 (file)
@@ -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 */
index d4909f55fe35d041a64736ee7b42da548cac56af..da7dbc4dba9344aa7736565118eca5c1ca0a91c8 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _PARISC_SIGINFO_H
 #define _PARISC_SIGINFO_H
 
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
+
 #include <asm-generic/siginfo.h>
 
 /*
index 4f74361442d3fc61f095b9c818c9562782c10dc3..b5127b06416fba978735a2c12dae0a6b88dc1835 100644 (file)
@@ -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>
 
index 6a5f71e8f2e9dad578f9934d80d4230d4726234f..ff760c478463d0a656d05c2d78b70c447cb1dd91 100644 (file)
@@ -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>