]> granicus.if.org Git - strace/commitdiff
Update linux sparc support so it compiles and works reasonably
authorWichert Akkerman <wichert@deephackmode.org>
Sun, 18 Apr 1999 23:30:29 +0000 (23:30 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Sun, 18 Apr 1999 23:30:29 +0000 (23:30 +0000)
ChangeLog
TODO
file.c
linux/sparc/syscallent.h
stream.c

index edcdf4cbf55fd402d656ba996cf2e89b902e7441..8a5ab4482f47eb9d86aca22e02fbd93b67cb060d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ Sun Apr 18 22:32:42 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
 
   * 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 4767f4141a5df73410c8c591c720f9cdd4d3dec2..18824be931f9fa96833e0cc0708c3c64490c4cb0 100644 (file)
--- 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 9040ebfe6611ec63d45b1a05e037b096cf2c87a8..449077d7f69352e024f29bcdecf49a1aa8398f45 100644 (file)
--- a/file.c
+++ b/file.c
 
 #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 @@ struct tcb *tcp;
                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");
index 4be6d5e2361f6df49dbefcba92551a50ff699607..3b85e1cc16af85592b0fd07cba9e14153d949b56 100644 (file)
        { 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 */
        { 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 */
        { 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 */
        { 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 */
index 4c632f305a332543d37ee9d44db1fd9d69261770..f242b6387cbc89273dc4db6314763711c66f5a2b 100644 (file)
--- 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 @@ struct strbuf {
 #define MORECTL 1
 #define MOREDATA 2
 
-#else /* LINUXSPARC */
+#else /* linux */
 
 #include <stropts.h>
 #include <poll.h>
@@ -51,7 +51,7 @@ struct strbuf {
 #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 @@ static struct xlat msgflags[] = {
        { 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 @@ struct tcb *tcp;
 
 #endif /* HAVE_PUTPMSG */
 
-#if !defined(LINUXSPARC)
 
 static struct xlat pollflags[] = {
        { POLLIN,       "POLLIN"        },
@@ -819,4 +811,3 @@ int code, arg;
 
 #endif /* LINUXSPARC && linux */
 
-#endif /* HAVE_SYS_STREAM_H */