Update linux sparc support so it compiles and works reasonably
diff --git a/ChangeLog b/ChangeLog
index edcdf4c..8a5ab44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
   * Update syscalls for linux alpha, patch from Bart Warmerdam
     <bartw@debian.org> 
+  * Update sparc code so it actually compiles
 
 Fri Apr 16 02:18:05 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
 
diff --git a/TODO b/TODO
index 4767f41..18824be 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,8 @@
+-- new entries from wta
+getdents has wrong structure; track down kernel version
+
+
+-- old entries from jrs
 require override to run suid and/or sgid executables normally
 attempt reopen of /proc file if we get EAGAIN from any /proc ioctl
 kill procs we error out of on svr4
diff --git a/file.c b/file.c
index 9040ebf..449077d 100644
--- a/file.c
+++ b/file.c
@@ -33,13 +33,21 @@
 
 #include <dirent.h>
 
-#ifdef linux
-#define stat libc_stat
-#include <statbuf.h>
-#undef stat
-#include <asm/stat.h>
+#ifdef LINUXSPARC
+#  include <asm/stat.h>
+#  define stat libc_stat
+#  include <sys/stat.h>
+#  undef stat
+#elif defined(linux)
+#  define stat libc_stat
+#  include <statbuf.h>
+#  undef stat
+#  include <asm/stat.h>
+#  include <sys/stat.h>
+#else
+#  include <sys/stat.h>
 #endif
-#include <sys/stat.h>
+
 #include <fcntl.h>
 
 #ifdef SVR4
@@ -1233,12 +1241,6 @@
 		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
 		return 0;
 	}
-#ifdef linux
-#ifdef __sparc__
-        tprintf (" = Unknown value\n");
-        return 0;
-#endif
-#endif
 	len = tcp->u_rval;
 	if ((buf = malloc(len)) == NULL) {
 		tprintf("out of memory\n");
diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h
index 4be6d5e..3b85e1c 100644
--- a/linux/sparc/syscallent.h
+++ b/linux/sparc/syscallent.h
@@ -203,7 +203,7 @@
 	{ 5,	0,	printargs,	"sgetmask" },		/* 199 */
 	{ 5,	0,	printargs,	"ssetmask" },		/* 200 */
 	{ 3,	TS,	sys_sigsuspend,	"sigsuspend" },		/* 201 */
-	{ 2,	TF,	sys_oldlstat,	"oldlstat" },		/* 202 */
+	{ 2,	TF,	sys_lstat,	"lstat" },		/* 202 */
 	{ 1,	TF,	sys_uselib,	"uselib" },		/* 203 */
 	{ 3,	0,	sys_readdir,	"readdir" },		/* 204 */
 	{ 3,	0,	sys_ioperm,	"ioperm" },		/* 205 */
@@ -212,7 +212,7 @@
 	{ 1,	0,	sys_olduname,	"olduname" },		/* 208 */
 	{ 1,	0,	sys_iopl,	"iopl" },		/* 209 */
 	{ 0,	0,	sys_idle,	"idle" },		/* 210 */
-	{ 1,	0,	sys_vm86,	"vm86" },		/* 211 */
+	{ 1,	0,	sys_vm86old,	"vm86" },		/* 211 */
 	{ 3,	TP,	sys_waitpid,	"waitpid" },		/* 212 */
 	{ 1,	0,	sys_swapoff,	"swapoff" },		/* 213 */
 	{ 1,	0,	sys_sysinfo,	"sysinfo" },		/* 214 */
@@ -233,10 +233,10 @@
 	{ 1,	0,	sys_setfsgid,	"setfsgid" },		/* 229 */
 	{ 5,	0,	printargs,	"_newselect" },		/* 230 */
 	{ 1,	0,	sys_time,	"time" },		/* 231 */
-	{ 2,	TF,	sys_oldstat,	"oldstat" },		/* 232 */
+	{ 2,	TF,	printargs,	"nis_syscall" },	/* 232 */
 	{ 1,	0,	sys_stime,	"stime" },		/* 233 */
-	{ 2,	0,	sys_oldfstat,	"oldfstat" },		/* 234 */
-	{ 0,	0,	sys_phys,	"phys" },		/* 235 */
+	{ 2,	0,	printargs,	"nis_syscall" },	/* 234 */
+	{ 2,	0,	printargs,	"nis_syscall" },	/* 235 */
 	{ 5,	0,	printargs,	"_llseek" },		/* 236 */
 	{ 5,	0,	sys_mlock,	"mlock" },		/* 237 */
 	{ 5,	0,	sys_munlock,	"munlock" },		/* 238 */
@@ -255,9 +255,9 @@
 	{ 5,	0,	sys_sysctl,	"_sysctl" },		/* 251 */
 	{ 5,	0,	sys_getsid,	"getsid" },		/* 252 */
 	{ 5,	0,	sys_fdatasync,	"fdatasync" },		/* 253 */
-	{ 5,	0,	printargs,	"SYS_254" },		/* 254 */
-	{ 5,	0,	printargs,	"SYS_255" },		/* 255 */
-	{ 5,	0,	printargs,	"SYS_256" },		/* 256 */
+	{ 5,	0,	printargs,	"nfsservctl" },		/* 254 */
+	{ 5,	0,	printargs,	"aplib" },		/* 255 */
+	{ 5,	0,	printargs,	"nis_syscall" },	/* 256 */
 	{ 5,	0,	printargs,	"SYS_257" },		/* 257 */
 	{ 5,	0,	printargs,	"SYS_258" },		/* 258 */
 	{ 5,	0,	printargs,	"SYS_259" },		/* 259 */
diff --git a/stream.c b/stream.c
index 4c632f3..f242b63 100644
--- a/stream.c
+++ b/stream.c
@@ -29,9 +29,9 @@
 
 #include "defs.h"
 
-#if defined(HAVE_SYS_STREAM_H) || defined(LINUXSPARC) || defined(linux)
+#if defined(HAVE_SYS_STREAM_H) || defined(linux)
 
-#if defined(LINUXSPARC) || defined(linux)
+#if defined(linux)
 #include <sys/poll.h>
 
 #define RS_HIPRI 1
@@ -43,7 +43,7 @@
 #define MORECTL 1
 #define MOREDATA 2
 
-#else /* LINUXSPARC */
+#else /* linux */
 
 #include <stropts.h>
 #include <poll.h>
@@ -51,7 +51,7 @@
 #include <sys/stream.h>
 #include <sys/tihdr.h>
 
-#endif /* LINUXSPARC */
+#endif /* linux */
 
 #ifdef HAVE_SYS_TIUSER_H
 #include <sys/tiuser.h>
@@ -64,13 +64,6 @@
 	{ 0,		NULL		},
 };
 
-#if 0
-static struct xlat getmsgflags[] = {
-	{ MORECTL,	"MORECTL"	},
-	{ MOREDATA,	"MOREDATA"	},
-	{ 0,		NULL		},
-};
-#endif
 
 static void
 printstrbuf(tcp, sbp, getting)
@@ -256,7 +249,6 @@
 
 #endif /* HAVE_PUTPMSG */
 
-#if !defined(LINUXSPARC)
 
 static struct xlat pollflags[] = {
 	{ POLLIN,	"POLLIN"	},
@@ -819,4 +811,3 @@
 
 #endif /* LINUXSPARC && linux */
 
-#endif /* HAVE_SYS_STREAM_H */