All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] updated asm-sparc/{processor,signal,sigcontext}.h to
@ 2004-12-08 10:53 Jeremy Huddleston
  2004-12-09  5:01 ` David S. Miller
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Jeremy Huddleston @ 2004-12-08 10:53 UTC (permalink / raw)
  To: sparclinux


[-- Attachment #1.1: Type: text/plain, Size: 437 bytes --]

On Fri, 2004-12-03 at 17:34 -0800, Jeremy Huddleston wrote:
> asm-sparc/signal.h needs:
> 
> #include <linux/compiler>
> 
> because it uses __user around line 214.  Without this include, userland
> code including asm/signal.h will fail to compile.

I've updated the patch to fix a few more problems with redefined
structs, etc when using they are included after glibc headers.

-- 
Jeremy Huddleston <eradicator@gentoo.org>

[-- Attachment #1.2: linux26-headers-2.6.8.1-sparc-glibcsafe.patch --]
[-- Type: text/x-patch, Size: 2557 bytes --]

--- linux/include/asm-sparc/signal.h.orig	2004-12-07 14:53:47.747817312 -0800
+++ linux/include/asm-sparc/signal.h	2004-12-07 14:52:42.165787296 -0800
@@ -3,6 +3,7 @@
 #define _ASMSPARC_SIGNAL_H
 
 #include <asm/sigcontext.h>
+#include <linux/compiler.h>
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
@@ -113,11 +114,14 @@
 	unsigned long	sig[_NSIG_WORDS];
 } __new_sigset_t;
 
+
+#ifndef _SIGNAL_H
 /* A SunOS sigstack */
 struct sigstack {
 	char *the_stack;
 	int   cur_status;
 };
+#endif
 
 /* Sigvec flags */
 #define _SV_SSTACK    1u    /* This signal handler should use sig-stack */
@@ -191,12 +195,14 @@
 #define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
 #define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
 
+#ifndef _SIGNAL_H
 struct __new_sigaction {
 	__sighandler_t	sa_handler;
 	unsigned long	sa_flags;
 	void		(*sa_restorer)(void);	/* Not used by Linux/SPARC */
 	__new_sigset_t	sa_mask;
 };
+#endif
 
 #ifdef __KERNEL__
 struct k_sigaction {
@@ -205,6 +211,7 @@
 };
 #endif
 
+#ifndef _SIGNAL_H
 struct __old_sigaction {
 	__sighandler_t	sa_handler;
 	__old_sigset_t	sa_mask;
@@ -217,6 +224,7 @@
 	int		ss_flags;
 	size_t		ss_size;
 } stack_t;
+#endif
 
 #ifdef __KERNEL__
 struct sparc_deliver_cookie {
--- linux/include/asm-sparc/sigcontext.h.orig	2004-12-07 14:46:54.492641648 -0800
+++ linux/include/asm-sparc/sigcontext.h	2004-12-07 15:04:19.167826880 -0800
@@ -4,9 +4,9 @@
 
 #ifdef __KERNEL__
 #include <asm/ptrace.h>
-#endif
 
 #ifndef __ASSEMBLY__
+#ifndef _SIGNAL_H
 
 #define __SUNOS_MAXWIN   31
 
@@ -57,8 +57,6 @@
 	} si_fpqueue [16];
 } __siginfo_fpu_t;
 
-#ifdef __KERNEL__
-
 /* This magic should be in g_upper[0] for all upper parts
    to be valid.
    This is generated by sparc64 only, but for 32bit processes,
@@ -69,8 +67,13 @@
 	unsigned   int o_upper[8];
 } siginfo_extra_v8plus_t;
 
-#endif
+#endif /* !(_SIGNAL_H) */
 
 #endif /* !(__ASSEMBLY__) */
 
+#else /* !(__KERNEL__) */
+#include <signal.h> /* Pulls in <bits/sigcontext.h> which contains both /*
+                    /* of these structures... */
+#endif
+
 #endif /* !(__SPARC_SIGCONTEXT_H) */
--- linux/include/asm-sparc/processor.h.orig	2004-12-07 15:14:37.267861392 -0800
+++ linux/include/asm-sparc/processor.h	2004-12-07 15:14:49.898941176 -0800
@@ -43,10 +43,12 @@
 
 struct task_struct;
 
+#ifndef _SYS_UCONTEXT_H
 struct fpq {
 	unsigned long *insn_addr;
 	unsigned long insn;
 };
+#endif
 
 typedef struct {
 	int seg;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-12-28  6:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-08 10:53 [PATCH] updated asm-sparc/{processor,signal,sigcontext}.h to Jeremy Huddleston
2004-12-09  5:01 ` David S. Miller
2004-12-09  5:25 ` David S. Miller
2004-12-09  5:25 ` Jeremy Huddleston
2004-12-09  6:00 ` Jeremy Huddleston
2004-12-09  7:46 ` David S. Miller
2004-12-12  0:06 ` Jeremy Huddleston
2004-12-28  2:38 ` David S. Miller
2004-12-28  3:06 ` [PATCH] updated asm-sparc/{processor,signal,sigcontext}.h to behave nicely in userland William Lee Irwin III
2004-12-28  3:27 ` [PATCH] updated asm-sparc/{processor,signal,sigcontext}.h to David S. Miller
2004-12-28  3:33 ` Jeremy Huddleston
2004-12-28  6:16 ` [PATCH] updated asm-sparc/{processor,signal,sigcontext}.h to behave nicely in userland William Lee Irwin III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.