summaryrefslogtreecommitdiff
path: root/patches/glibc/2.7/270-sh-fix-procfs.patch
blob: f5f8bb1e41762272932a32049d1e0c863f94ddf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff -durN glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/procfs.h glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/procfs.h
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/procfs.h	2004-11-20 18:56:16.000000000 +0100
+++ glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/procfs.h	2008-10-24 11:21:15.000000000 +0200
@@ -29,10 +29,32 @@
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <sys/user.h>
-#include <asm/elf.h>
 
 __BEGIN_DECLS
 
+/* BEGIN - UGLY HACK - YEM
+ * These definitions are copied from the Alpha file,
+ * and the register numbers are set accordingly to
+ * what I could find in the Linux kernel sources
+ * Highly dubious !!!!
+ * BIG FAT WARNING !!!
+ */
+
+/* Linux kernel says 16 (standards?) registers */
+#define ELF_NGREG  16
+/* Linux kernel says 16 floating point registers */
+#define ELF_NFPREG 16
+
+/* Copied from Alpha as is */
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+/* Ditto */
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+/* END - UGLY HACK - YEM */
+
 struct elf_siginfo
   {
     int si_signo;			/* Signal number.  */