diff -crN top-3.4.orig/commands.c top-3.4/commands.c *** top-3.4.orig/commands.c Tue Aug 27 23:13:57 1996 --- top-3.4/commands.c Tue Jan 21 22:55:07 2003 *************** *** 153,159 **** struct errs /* structure for a system-call error */ { ! int errno; /* value of errno (that is, the actual error) */ char *arg; /* argument that caused the error */ }; --- 153,159 ---- struct errs /* structure for a system-call error */ { ! int err_no; /* value of errno (that is, the actual error) */ char *arg; /* argument that caused the error */ }; *************** *** 172,178 **** else \ { \ errs[errcnt].arg = (p); \ ! errs[errcnt++].errno = (e); \ } /* --- 172,178 ---- else \ { \ errs[errcnt].arg = (p); \ ! errs[errcnt++].err_no = (e); \ } /* *************** *** 212,218 **** while (cnt < errcnt) { errp = &(errs[cnt++]); ! if (errp->errno != currerr) { if (currerr != -1) { --- 212,218 ---- while (cnt < errcnt) { errp = &(errs[cnt++]); ! if (errp->err_no != currerr) { if (currerr != -1) { *************** *** 222,228 **** } (void) strcat(string, "; "); /* we know there's more */ } ! currerr = errp->errno; first = Yes; } if ((stringlen = str_addarg(string, stringlen, errp->arg, first)) ==0) --- 222,228 ---- } (void) strcat(string, "; "); /* we know there's more */ } ! currerr = errp->err_no; first = Yes; } if ((stringlen = str_addarg(string, stringlen, errp->arg, first)) ==0) *************** *** 310,316 **** { register int result; ! if ((result = p1->errno - p2->errno) == 0) { return(strcmp(p1->arg, p2->arg)); } --- 310,316 ---- { register int result; ! if ((result = p1->err_no - p2->err_no) == 0) { return(strcmp(p1->arg, p2->arg)); } *************** *** 341,347 **** while (cnt++ < errcnt) { printf("%5s: %s\n", errp->arg, ! errp->errno == 0 ? "Not a number" : errmsg(errp->errno)); errp++; } } --- 341,347 ---- while (cnt++ < errcnt) { printf("%5s: %s\n", errp->arg, ! errp->err_no == 0 ? "Not a number" : errmsg(errp->err_no)); errp++; } } diff -crN top-3.4.orig/machine/m_linux.c top-3.4/machine/m_linux.c *** top-3.4.orig/machine/m_linux.c Mon Jan 15 10:18:00 1996 --- top-3.4/machine/m_linux.c Tue Jan 21 23:00:11 2003 *************** *** 33,39 **** --- 33,43 ---- #include /* for HZ */ #include /* for PAGE_SHIFT */ + #if 0 /* compiling for SL-Zaurus on FreeBSD box */ #include /* for NR_TASKS */ + #else + #define NR_TASKS 255 + #endif #if 0 #include /* for PROC_SUPER_MAGIC */ diff -crN top-3.4.orig/machine.c top-3.4/machine.c *** top-3.4.orig/machine.c Mon Jan 15 10:18:00 1996 --- top-3.4/machine.c Tue Jan 21 23:00:11 2003 *************** *** 33,39 **** --- 33,43 ---- #include /* for HZ */ #include /* for PAGE_SHIFT */ + #if 0 /* compiling for SL-Zaurus on FreeBSD box */ #include /* for NR_TASKS */ + #else + #define NR_TASKS 255 + #endif #if 0 #include /* for PROC_SUPER_MAGIC */ diff -crN top-3.4.orig/utils.c top-3.4/utils.c *** top-3.4.orig/utils.c Fri Aug 23 07:55:58 1996 --- top-3.4/utils.c Tue Jan 21 23:00:13 2003 *************** *** 329,336 **** --- 329,338 ---- /* externs referenced by errmsg */ + #if 0 /* compiling for SL-Zaurus on FreeBSD box */ extern char *sys_errlist[]; extern int sys_nerr; + #endif char *errmsg(errnum)