several Linux/sparc fixes
diff --git a/ChangeLog b/ChangeLog
index 5f8c24e..a0c9022 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2001-03-28 Wichert Akkerman <wakkerma@debian.org>
+ * configure.in: use sparc* so we can compile on sparc64 as well
+ * process.c, syscall.c: work around double define of fpq, fq and fpu
+ structs on Linux/sparc, and use regs instead of pt_regs
+ * don't use asm/sigcontext.h on Linux/sparc
+
+2001-03-28 Wichert Akkerman <wakkerma@debian.org>
+
* linux/sparc/ioctlent.h: updated using new Linux ioctl setup
2001-03-28 Wichert Akkerman <wakkerma@debian.org>
diff --git a/configure.in b/configure.in
index 71b26dd..4baf06f 100644
--- a/configure.in
+++ b/configure.in
@@ -47,7 +47,7 @@
m68k)
arch=m68k
;;
-sparc)
+sparc*)
arch=sparc
;;
mips*)
diff --git a/linux/sparc/syscall.h b/linux/sparc/syscall.h
index 6ee1ace..24616ae 100644
--- a/linux/sparc/syscall.h
+++ b/linux/sparc/syscall.h
@@ -36,7 +36,7 @@
/* 1.1 processes and protection */
int sys_gethostid(),sys_sethostname(),sys_gethostname(),sys_getpid();
int sys_setdomainname(),sys_getdomainname();
-int sys_fork(),sys_exit(),sys_execv(),sys_execve(),sys_wait4(),sys_waitpid();
+int sys_fork(),sys_clone(),sys_exit(),sys_execv(),sys_execve(),sys_wait4(),sys_waitpid();
int sys_setuid(),sys_setgid(),sys_getuid(),sys_setreuid(),sys_getgid(),sys_getgroups(),sys_setregid(),sys_setgroups();
int sys_getpgrp(),sys_setpgrp();
int sys_setsid(), sys_setpgid();
@@ -45,7 +45,7 @@
/* 1.2 memory management */
int sys_brk(),sys_sbrk(),sys_sstk();
int sys_getpagesize(),sys_mmap(),sys_mctl(),sys_munmap(),sys_mprotect(),sys_mincore(), sys_mremap();
-int sys_omsync(),sys_omadvise();
+int sys_omsync(),sys_omadvise(), sys_madvise(),sys_mlockall();
/* 1.3 signals */
int sys_sigvec(),sys_sigblock(),sys_sigsetmask(),sys_sigpause(),sys_sigstack(),sys_sigcleanup(), sys_sigreturn();
@@ -66,7 +66,7 @@
int sys_rtschedule(), sys_personality();
/* 1.7 system operation support */
-int sys_mount(),sys_unmount(),sys_swapon();
+int sys_mount(),sys_unmount(),sys_swapon(),sys_pivotroot();
int sys_sync(),sys_reboot();
int sys_sysacct();
int sys_auditsys();
diff --git a/process.c b/process.c
index d2697cd..efa125f 100644
--- a/process.c
+++ b/process.c
@@ -53,6 +53,20 @@
#include <sys/ptrace.h>
#endif
+#if HAVE_ASM_REG_H
+#ifdef SPARC
+# define fpq kernel_fpq
+# define fq kernel_fq
+# define fpu kernel_fpu
+#endif
+#include <asm/reg.h>
+#ifdef SPARC
+# undef fpq
+# undef fq
+# undef fpu
+#endif
+#endif /* HAVE_ASM_REG_H */
+
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
#ifndef PTRACE_PEEKUSR
@@ -460,10 +474,10 @@
return -1;
return 0;
#elif defined(SPARC)
- struct pt_regs regs;
+ struct regs regs;
if (ptrace(PTRACE_GETREGS, tcp->pid, (char*)®s, 0)<0)
return -1;
- reg.r_g1=new;
+ regs.r_g1=new;
if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)®s, 0)<0)
return -1;
return 0;
diff --git a/signal.c b/signal.c
index 082f5c7..6051d8f 100644
--- a/signal.c
+++ b/signal.c
@@ -63,15 +63,29 @@
# include <asm/ptrace_offsets.h>
#endif /* !IA64 */
-#ifdef HAVE_ASM_SIGCONTEXT_H
-#include <asm/sigcontext.h>
+#if HAVE_ASM_REG_H
#ifdef SPARC
+# define fpq kernel_fpq
+# define fq kernel_fq
+# define fpu kernel_fpu
+#endif
#include <asm/reg.h>
+#ifdef SPARC
+# undef fpq
+# undef fq
+# undef fpu
+#endif
+
+#endif /* HAVE_ASM_REG_H */
+#ifdef HAVE_ASM_SIGCONTEXT_H
+#ifdef SPARC
typedef struct {
struct regs si_regs;
int si_mask;
} m_siginfo_t;
-#endif
+#else
+#include <asm/sigcontext.h>
+#endif /* SPARC */
#else /* !HAVE_ASM_SIGCONTEXT_H */
#ifdef I386
struct sigcontext_struct {
diff --git a/syscall.c b/syscall.c
index ffd8f65..39cc026 100644
--- a/syscall.c
+++ b/syscall.c
@@ -43,7 +43,17 @@
#include <sys/param.h>
#if HAVE_ASM_REG_H
+#ifdef SPARC
+# define fpq kernel_fpq
+# define fq kernel_fq
+# define fpu kernel_fpu
+#endif
#include <asm/reg.h>
+#ifdef SPARC
+# undef fpq
+# undef fq
+# undef fpu
+#endif
#endif
#ifdef HAVE_SYS_REG_H
@@ -625,7 +635,7 @@
static long r0;
static long a3;
#elif defined (SPARC)
- static struct pt_regs regs;
+ static struct regs regs;
static unsigned long trap;
#elif defined(MIPS)
static long a3;