Subject: sys_errlist[] wastes 2kb of D-space [+fix] (#310 2 of 4) Index: lib/libc/gen/errlst.c+many,many_more 2.11BSD Description: The array of system error message strings occupies approximately 2kb of Data space in any program which calls perror(), strerror() or explicitly references sys_errlist[] or sys_nerr. Since sys_errlist is initialized data it also occupies ~4 sectors of disk space in each program's executable disk image. Repeat-By: Observation. Or by compiling these test programs and using size(1): extern char *sys_errlist[]; main() { char *cp; cp = sys_errlist[0]; exit(0); } cc x.c size a.out text data bss dec hex 362 2042 4 2408 968 main() { perror("foo"); exit(0); } cc y.c size a.out text data bss dec hex 3310 2298 4 5668 1624 In both cases the 'data' segment is 100% sys_errlist[]'s contribution. After applying the updates in this kit the second program's size is: text data bss dec hex 1008 60 68 1136 470 Fix: This is #310 (part 2 of 4). This is the first of the three patch files in the update kit. Refer to the instructions in #309. ----------------------------cut here--------------------------- *** /usr/include/string.h.old Mon Jan 15 20:29:08 1996 --- /usr/include/string.h Wed Mar 20 22:10:13 1996 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)string.h 5.1.2 (2.11BSD) 1996/1/15 */ #include --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)string.h 5.1.3 (2.11BSD) 1996/3/20 */ #include *************** *** 13,19 **** #endif extern char *strcat(), *strncat(), *strcpy(), *strncpy(), *index(); ! extern char *rindex(), *strstr(); extern int strcmp(), strncmp(), strcasecmp(), strncasecmp(), strlen(); extern int memcmp(); --- 13,19 ---- #endif extern char *strcat(), *strncat(), *strcpy(), *strncpy(), *index(); ! extern char *rindex(), *strstr(), *syserrlst(); extern int strcmp(), strncmp(), strcasecmp(), strncasecmp(), strlen(); extern int memcmp(); *** /usr/lib/lint/llib-lc.old Tue Mar 26 23:19:20 1996 --- /usr/lib/lint/llib-lc Tue Mar 26 23:32:27 1996 *************** *** 1,4 **** ! /* @(#)llib-lc 1.42 (2.11BSD GTE) 1996/1/27 */ /* LINTLIBRARY */ --- 1,4 ---- ! /* @(#)llib-lc 1.43 (2.11BSD GTE) 1996/3/26 */ /* LINTLIBRARY */ *************** *** 387,392 **** --- 387,393 ---- char * strcpy(a, b) char *a, *b; { return a; } char * strcpyn(a, b, n) char *a, *b; { return a; } int strcspn(s, set) char *s, *set; { return(0); } + char * strerror(err) int err; { return ((char *)0); } int strlen(s) char *s; { return(1); } char * strncat(a, b, n) char *a, *b; { return a;} int strncmp(a, b, n) char *a, *b; { return(1); } *************** *** 393,407 **** char * strncpy(a, b, n) char *a, *b; { return a; } char * strpbrk(s, brk) char *s, *brk; { return s; } char * strrchr(s, c) char *s, c; { return s; } int strspn(s, set) char *s, *set; { return(0); } char * strtok(s, sep) char *s, *sep; { return s; } int stty(f, b) struct sgttyb *b; { return(0); } ! swab( f, t, n) char *f, *t; {;} /* VARARGS2 */ syslog(l, f) char *f; {} - char * sys_errlist[]; char * sys_siglist[]; - int sys_nerr; int system(s) char *s; { return(0); } long tell(f) { return((long)0); } long telldir( p ) DIR *p; { return 1L; } --- 394,409 ---- char * strncpy(a, b, n) char *a, *b; { return a; } char * strpbrk(s, brk) char *s, *brk; { return s; } char * strrchr(s, c) char *s, c; { return s; } + char * strsep(stringp, delim) char **stringp; char *delim; { return(delim); } int strspn(s, set) char *s, *set; { return(0); } char * strtok(s, sep) char *s, *sep; { return s; } int stty(f, b) struct sgttyb *b; { return(0); } ! char * syserrlst(err) int err; { return((char *) 0); } ! char * __errlst(err,path) int err; char *path; { return((char *) 0); } ! int swab( f, t, n) char *f, *t; {;} /* VARARGS2 */ syslog(l, f) char *f; {} char * sys_siglist[]; int system(s) char *s; { return(0); } long tell(f) { return((long)0); } long telldir( p ) DIR *p; { return 1L; } *** /usr/src/bin/csh/sh.exec.c.old Sat Aug 31 00:06:43 1991 --- /usr/src/bin/csh/sh.exec.c Wed Mar 20 22:48:27 1996 *************** *** 5,14 **** */ #if !defined(lint) && defined(DOSCCS) ! static char *sccsid = "@(#)sh.exec.c 5.2 (Berkeley) 6/6/85"; #endif #include "sh.h" #include /* --- 5,15 ---- */ #if !defined(lint) && defined(DOSCCS) ! static char *sccsid = "@(#)sh.exec.c 5.2.1 (2.11BSD) 1996/3/20"; #endif #include "sh.h" + #include #include /* *************** *** 195,201 **** { register struct varent *v; register char **vp; - extern char *sys_errlist[]; char *lastsh[2]; execv(f, t); --- 196,201 ---- *************** *** 240,246 **** default: if (exerr == 0) { ! exerr = sys_errlist[errno]; expath = savestr(f); } } --- 240,246 ---- default: if (exerr == 0) { ! exerr = syserrlst(errno); expath = savestr(f); } } *** /usr/src/bin/csh/sh.proc.c.old Sat Aug 31 00:11:22 1991 --- /usr/src/bin/csh/sh.proc.c Wed Mar 20 22:50:07 1996 *************** *** 5,16 **** */ #if !defined(lint) && defined(DOSCCS) ! static char *sccsid = "@(#)sh.proc.c 5.5 (Berkeley) 5/13/86"; #endif #include "sh.h" #include "sh.dir.h" #include "sh.proc.h" #include #include --- 5,17 ---- */ #if !defined(lint) && defined(DOSCCS) ! static char *sccsid = "@(#)sh.proc.c 5.5.1 (2.11BSD) 1996/3/20"; #endif #include "sh.h" #include "sh.dir.h" #include "sh.proc.h" + #include #include #include *************** *** 819,825 **** int pid, err = 0; long omask; char *cp; - extern char *sys_errlist[]; omask = sigmask(SIGCHLD); if (setintr) --- 820,825 ---- *************** *** 846,852 **** } if (killpg(pp->p_jobid, signum) < 0) { printf("%s: ", cp); ! printf("%s\n", sys_errlist[errno]); err++; } if (signum == SIGTERM || signum == SIGHUP) --- 846,852 ---- } if (killpg(pp->p_jobid, signum) < 0) { printf("%s: ", cp); ! printf("%s\n", syserrlst(errno)); err++; } if (signum == SIGTERM || signum == SIGHUP) *************** *** 857,863 **** pid = atoi(cp); if (kill(pid, signum) < 0) { printf("%d: ", pid); ! printf("%s\n", sys_errlist[errno]); err++; goto cont; } --- 857,863 ---- pid = atoi(cp); if (kill(pid, signum) < 0) { printf("%d: ", pid); ! printf("%s\n", syserrlst(errno)); err++; goto cont; } *** /usr/src/bin/kill.c.old Sun Feb 8 14:24:52 1987 --- /usr/src/bin/kill.c Thu Mar 21 19:46:33 1996 *************** *** 1,4 **** ! static char *sccsid = "@(#)kill.c 4.4 (Berkeley) 4/20/86"; /* * kill - send signal to process */ --- 1,4 ---- ! static char *sccsid = "@(#)kill.c 4.4.1 (2.11BSD) 1996/3/21"; /* * kill - send signal to process */ *************** *** 18,24 **** { register signo, pid, res; int errlev; - extern char *sys_errlist[]; extern errno; errlev = 0; --- 18,23 ---- *************** *** 65,71 **** goto usage; res = kill(pid = atoi(*argv), signo); if (res<0) { ! printf("%u: %s\n", pid, sys_errlist[errno]); errlev = 1; } argc--; --- 64,70 ---- goto usage; res = kill(pid = atoi(*argv), signo); if (res<0) { ! printf("%u: %s\n", pid, strerror(errno)); errlev = 1; } argc--; *** /usr/src/bin/rcp.c.old Tue Sep 5 09:10:53 1989 --- /usr/src/bin/rcp.c Thu Mar 21 19:55:04 1996 *************** *** 15,28 **** * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ ! #ifndef lint char copyright[] = "@(#) Copyright (c) 1983 The Regents of the University of California.\n\ All rights reserved.\n"; - #endif /* not lint */ ! #ifndef lint ! static char sccsid[] = "@(#)rcp.c 5.20 (Berkeley) 5/23/89"; #endif /* not lint */ /* --- 15,26 ---- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ ! #if !defined(lint) && defined(DOSCCS) char copyright[] = "@(#) Copyright (c) 1983 The Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)rcp.c 5.20.1 (2.11BSD) 1996/3/21"; #endif /* not lint */ /* *************** *** 54,60 **** #endif extern int errno; - extern char *sys_errlist[]; struct passwd *pwd; int errs, pflag, port, rem, userid; int iamremote, iamrecursive, targetshouldbedirectory; --- 52,57 ---- *************** *** 356,362 **** return; errno = ENOTDIR; } ! error("rcp: %s: %s.\n", cp, sys_errlist[errno]); exit(1); } --- 353,359 ---- return; errno = ENOTDIR; } ! error("rcp: %s: %s.\n", cp, strerror(errno)); exit(1); } *************** *** 429,435 **** for (x = 0; x < argc; x++) { name = argv[x]; if ((f = open(name, O_RDONLY, 0)) < 0) { ! error("rcp: %s: %s\n", name, sys_errlist[errno]); continue; } if (fstat(f, &stb) < 0) --- 426,432 ---- for (x = 0; x < argc; x++) { name = argv[x]; if ((f = open(name, O_RDONLY, 0)) < 0) { ! error("rcp: %s: %s\n", name, strerror(errno)); continue; } if (fstat(f, &stb) < 0) *************** *** 493,499 **** if (readerr == 0) (void)write(rem, "", 1); else ! error("rcp: %s: %s\n", name, sys_errlist[readerr]); (void)response(); } } --- 490,496 ---- if (readerr == 0) (void)write(rem, "", 1); else ! error("rcp: %s: %s\n", name, strerror(readerr)); (void)response(); } } *************** *** 507,513 **** char *last, *vect[1], path[MAXPATHLEN]; if (!(d = opendir(name))) { ! error("rcp: %s: %s\n", name, sys_errlist[errno]); return; } last = rindex(name, '/'); --- 504,510 ---- char *last, *vect[1], path[MAXPATHLEN]; if (!(d = opendir(name))) { ! error("rcp: %s: %s\n", name, strerror(errno)); return; } last = rindex(name, '/'); *************** *** 737,748 **** setimes = 0; if (utimes(np, tv) < 0) error("rcp: can't set times on %s: %s\n", ! np, sys_errlist[errno]); } continue; } if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { ! bad: error("rcp: %s: %s\n", np, sys_errlist[errno]); continue; } if (exists && pflag) --- 734,745 ---- setimes = 0; if (utimes(np, tv) < 0) error("rcp: can't set times on %s: %s\n", ! np, strerror(errno)); } continue; } if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { ! bad: error("rcp: %s: %s\n", np, strerror(errno)); continue; } if (exists && pflag) *************** *** 764,770 **** j = read(rem, cp, amt); if (j <= 0) { error("rcp: %s\n", ! j ? sys_errlist[errno] : "dropped connection"); exit(1); } --- 761,767 ---- j = read(rem, cp, amt); if (j <= 0) { error("rcp: %s\n", ! j ? strerror(errno) : "dropped connection"); exit(1); } *************** *** 784,790 **** wrerr++; if (ftruncate(ofd, size)) error("rcp: can't truncate %s: %s\n", np, ! sys_errlist[errno]); (void)close(ofd); (void)response(); if (setimes) { --- 781,787 ---- wrerr++; if (ftruncate(ofd, size)) error("rcp: can't truncate %s: %s\n", np, ! strerror(errno)); (void)close(ofd); (void)response(); if (setimes) { *************** *** 791,800 **** setimes = 0; if (utimes(np, tv) < 0) error("rcp: can't set times on %s: %s\n", ! np, sys_errlist[errno]); } if (wrerr) ! error("rcp: %s: %s\n", np, sys_errlist[errno]); else (void)write(rem, "", 1); } --- 788,797 ---- setimes = 0; if (utimes(np, tv) < 0) error("rcp: can't set times on %s: %s\n", ! np, strerror(errno)); } if (wrerr) ! error("rcp: %s: %s\n", np, strerror(errno)); else (void)write(rem, "", 1); } *************** *** 813,819 **** char *malloc(); if (fstat(fd, &stb) < 0) { ! error("rcp: fstat: %s\n", sys_errlist[errno]); return(0); } size = roundup(stb.st_blksize, blksize); --- 810,816 ---- char *malloc(); if (fstat(fd, &stb) < 0) { ! error("rcp: fstat: %s\n", strerror(errno)); return(0); } size = roundup(stb.st_blksize, blksize); *** /usr/src/etc/Makefile.old Tue Jan 23 19:30:37 1996 --- /usr/src/etc/Makefile Thu Mar 28 20:28:53 1996 *************** *** 3,9 **** # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # ! # @(#)Makefile 5.14.5 (2.11BSD GTE) 1996/1/15 # DESTDIR= CFLAGS= -O --- 3,9 ---- # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # ! # @(#)Makefile 5.14.6 (2.11BSD GTE) 1996/3/26 # DESTDIR= CFLAGS= -O *************** *** 63,70 **** install -s ${STD} ${NSTD} ${DESTDIR}/etc -for i in ${OPTIONAL}; do \ (if [ -f $$i ]; then install -s $$i ${DESTDIR}/etc; fi); done ! -for i in ${SETUID}; do \ ! (install -o root -m 4755 -s $$i ${DESTDIR}/etc/$$i); done -for i in ${KMEM}; do \ (install -g kmem -m 2755 -s $$i ${DESTDIR}/etc/$$i); done -for i in ${OPERATOR}; do \ --- 63,71 ---- install -s ${STD} ${NSTD} ${DESTDIR}/etc -for i in ${OPTIONAL}; do \ (if [ -f $$i ]; then install -s $$i ${DESTDIR}/etc; fi); done ! -for i in ${SETUID} x; do \ ! (if [ $$i != "x" ]; then install -o root -m 4755 -s $$i \ ! ${DESTDIR}/etc/$$i; fi); done -for i in ${KMEM}; do \ (install -g kmem -m 2755 -s $$i ${DESTDIR}/etc/$$i); done -for i in ${OPERATOR}; do \ *** /usr/src/etc/ftpd/ftpd.c.old Wed Nov 17 19:30:03 1993 --- /usr/src/etc/ftpd/ftpd.c Fri Mar 22 22:43:24 1996 *************** *** 20,26 **** "@(#) Copyright (c) 1985, 1988 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)ftpd.c 5.28.1 (2.11BSD) 11/17/93"; #endif /* --- 20,26 ---- "@(#) Copyright (c) 1985, 1988 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)ftpd.c 5.28.2 (2.11BSD) 1996/3/22"; #endif /* *************** *** 67,75 **** * NOT to be used on this machine. * Commonly used to disallow uucp. */ - extern int errno; - extern char *sys_errlist[]; - extern int sys_nerr; extern char *crypt(); extern char version[]; extern char *home; /* pointer to home directory for glob */ --- 67,72 ---- *************** *** 707,713 **** reply(425, "Can't create data socket (%s,%d): %s.", inet_ntoa(data_source.sin_addr), ntohs(data_source.sin_port), ! errno < sys_nerr ? sys_errlist[errno] : "unknown error"); return (NULL); } data = fileno(file); --- 704,710 ---- reply(425, "Can't create data socket (%s,%d): %s.", inet_ntoa(data_source.sin_addr), ntohs(data_source.sin_port), ! strerror(errno)); return (NULL); } data = fileno(file); *************** *** 1275,1284 **** int code; char *string; { ! if (errno < sys_nerr) ! reply(code, "%s: %s.", string, sys_errlist[errno]); ! else ! reply(code, "%s: unknown error %d.", string, errno); } static char *onefile[] = { --- 1272,1278 ---- int code; char *string; { ! reply(code, "%s: %s.", string, strerror(errno)); } static char *onefile[] = { *** /usr/src/etc/rlogind/rlogind.c.old Thu Mar 8 14:07:19 1990 --- /usr/src/etc/rlogind/rlogind.c Fri Mar 22 23:10:27 1996 *************** *** 15,29 **** * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ ! #ifndef lint char copyright[] = "@(#) Copyright (c) 1983, 1988 The Regents of the University of California.\n\ All rights reserved.\n"; - #endif /* not lint */ ! #ifndef lint ! static char sccsid[] = "@(#)rlogind.c 5.22.1.7 (Berkeley) 9/11/89"; ! #endif /* not lint */ /* * remote login server: --- 15,27 ---- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ ! #if !defined(lint) && defined(DOSCCS) char copyright[] = "@(#) Copyright (c) 1983, 1988 The Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)rlogind.c 5.22.1.8 (2.11BSD) 1996/3/22"; ! #endif /* * remote login server: *************** *** 74,83 **** #define SUPERUSER(pwd) ((pwd)->pw_uid == 0) - extern int errno; int reapchild(); struct passwd *getpwnam(), *pwd; - char *malloc(); main(argc, argv) int argc; --- 72,79 ---- *************** *** 512,524 **** char *msg; { char buf[BUFSIZ]; - extern int sys_nerr; - extern char *sys_errlist[]; ! if ((unsigned)errno < sys_nerr) ! (void) sprintf(buf, "%s: %s", msg, sys_errlist[errno]); ! else ! (void) sprintf(buf, "%s: Error %d", msg, errno); fatal(f, buf); } --- 508,515 ---- char *msg; { char buf[BUFSIZ]; ! (void) sprintf(buf, "%s: %s", msg, strerror(errno)); fatal(f, buf); } *** /usr/src/etc/rmt.c.old Sun Feb 15 20:51:18 1987 --- /usr/src/etc/rmt.c Fri Mar 22 22:58:44 1996 *************** *** 4,18 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint char copyright[] = "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; - #endif not lint ! #ifndef lint ! static char sccsid[] = "@(#)rmt.c 5.2 (Berkeley) 1/7/86"; ! #endif not lint /* * rmt --- 4,16 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) char copyright[] = "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)rmt.c 5.2.1 (2.11BSD) 1996/3/22"; ! #endif /* * rmt *************** *** 23,28 **** --- 21,29 ---- #include #include #include + #include + #include + #include int tape = -1; *************** *** 33,46 **** #define SSIZE 64 char device[SSIZE]; char count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE]; - - extern errno; - char *sys_errlist[]; char resp[BUFSIZ]; - char *sprintf(); - long lseek(); - FILE *debug; #define DEBUG(f) if (debug) fprintf(debug, f) #define DEBUG1(f,a) if (debug) fprintf(debug, f, a) --- 34,41 ---- *************** *** 89,95 **** case 'L': getstring(count); getstring(pos); DEBUG2("rmtd: L %s %s\n", count, pos); ! rval = lseek(tape, (long) atoi(count), atoi(pos)); if (rval < 0) goto ioerror; goto respond; --- 84,90 ---- case 'L': getstring(count); getstring(pos); DEBUG2("rmtd: L %s %s\n", count, pos); ! rval = lseek(tape, atol(count), atoi(pos)); if (rval < 0) goto ioerror; goto respond; *************** *** 165,172 **** getstring(bp) char *bp; { ! int i; ! char *cp = bp; for (i = 0; i < SSIZE; i++) { if (read(0, cp+i, 1) != 1) --- 160,167 ---- getstring(bp) char *bp; { ! register int i; ! register char *cp = bp; for (i = 0; i < SSIZE; i++) { if (read(0, cp+i, 1) != 1) *************** *** 182,194 **** char *record; int size; { - extern char *malloc(); if (size <= maxrecsize) return (record); if (record != 0) free(record); ! record = malloc(size); if (record == 0) { DEBUG("rmtd: cannot allocate buffer space\n"); exit(4); --- 177,188 ---- char *record; int size; { if (size <= maxrecsize) return (record); if (record != 0) free(record); ! record = (char *)malloc(size); if (record == 0) { DEBUG("rmtd: cannot allocate buffer space\n"); exit(4); *************** *** 204,210 **** int num; { ! DEBUG2("rmtd: E %d (%s)\n", num, sys_errlist[num]); ! (void) sprintf(resp, "E%d\n%s\n", num, sys_errlist[num]); ! (void) write(1, resp, strlen (resp)); } --- 198,204 ---- int num; { ! DEBUG2("rmtd: E %d (%s)\n", num, strerror(num)); ! (void) sprintf(resp, "E%d\n%s\n", num, strerror(num)); ! (void) write(1, resp, strlen(resp)); } *** /usr/src/etc/routed/defs.h.old Mon Jan 10 21:45:10 1994 --- /usr/src/etc/routed/defs.h Fri Mar 22 22:50:11 1996 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)defs.h 5.3.1 (2.11BSD GTE) 1/1/94 */ /* --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)defs.h 5.3.2 (2.11BSD GTE) 1996/3/22 */ /* *************** *** 56,62 **** char **argv0; struct servent *sp; - extern char *sys_errlist[]; extern int errno; char *malloc(); --- 56,61 ---- *** /usr/src/etc/syslogd.c.old Wed Jan 24 22:44:51 1996 --- /usr/src/etc/syslogd.c Fri Mar 22 23:06:26 1996 *************** *** 9,15 **** "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)syslogd.c 5.13.2 (2.11BSD GTE) 1996/1/24"; #endif /* --- 9,15 ---- "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)syslogd.c 5.13.3 (2.11BSD GTE) 1996/3/22"; #endif /* *************** *** 46,52 **** #include #include #include ! #include #include #include --- 46,52 ---- #include #include #include ! #include #include #include *************** *** 141,150 **** int MarkInterval = 20; /* interval between marks in minutes */ int MarkSeq = 0; /* mark sequence number */ - extern int errno, sys_nerr; - extern char *sys_errlist[]; - extern char *ctime(), *index(); - main(argc, argv) int argc; char **argv; --- 141,146 ---- *************** *** 755,764 **** if (errno == 0) (void) sprintf(buf, "syslogd: %s", type); - else if ((unsigned) errno > sys_nerr) - (void) sprintf(buf, "syslogd: %s: error %d", type, errno); else ! (void) sprintf(buf, "syslogd: %s: %s", type, sys_errlist[errno]); errno = 0; dprintf("%s\n", buf); logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE); --- 751,758 ---- if (errno == 0) (void) sprintf(buf, "syslogd: %s", type); else ! (void) sprintf(buf, "syslogd: %s: %s", type, strerror(errno)); errno = 0; dprintf("%s\n", buf); logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE); *** /usr/src/etc/tcpd/percent_m.c.old Wed Dec 28 08:42:37 1994 --- /usr/src/etc/tcpd/percent_m.c Sat Mar 23 22:04:34 1996 *************** *** 4,11 **** * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ ! #ifndef lint ! static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37"; #endif #include --- 4,11 ---- * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ ! #if !defined(lint) && defined(DOSCCS) ! static char sccsid[] = "@(#) percent_m.c 1.1.1 96/3/23 17:42:37"; #endif #include *************** *** 12,23 **** #include #include - extern int errno; - #ifndef SYS_ERRLIST_DEFINED - extern char *sys_errlist[]; - extern int sys_nerr; - #endif - #include "mystdarg.h" char *percent_m(obuf, ibuf) --- 12,17 ---- *************** *** 29,39 **** while (*bp = *cp) if (*cp == '%' && cp[1] == 'm') { ! if (errno < sys_nerr && errno > 0) { ! strcpy(bp, sys_errlist[errno]); ! } else { ! sprintf(bp, "Unknown error %d", errno); ! } bp += strlen(bp); cp += 2; } else { --- 23,29 ---- while (*bp = *cp) if (*cp == '%' && cp[1] == 'm') { ! strcpy(bp, strerror(errno)); bp += strlen(bp); cp += 2; } else { *** /usr/src/etc/tcpd/tli-sequent.c.old Wed Dec 28 08:42:51 1994 --- /usr/src/etc/tcpd/tli-sequent.c Sat Mar 23 22:03:24 1996 *************** *** 7,14 **** * Modified slightly to conform to the new internal interfaces - Wietse */ ! #ifndef lint ! static char sccsid[] = "@(#) tli-sequent.c 1.1 94/12/28 17:42:51"; #endif #ifdef TLI_SEQUENT --- 7,14 ---- * Modified slightly to conform to the new internal interfaces - Wietse */ ! #if !defined(lint) && defined(DOSCCS) ! static char sccsid[] = "@(#) tli-sequent.c 1.1.1 96/3/23 17:42:51"; #endif #ifdef TLI_SEQUENT *************** *** 156,169 **** } else { return (t_errlist[t_errno]); } ! } else { ! if (errno < 0 || errno >= sys_nerr) { ! sprintf(buf, "Unknown UNIX error %d", errno); ! return (buf); ! } else { ! return (sys_errlist[errno]); ! } ! } } /* tli_sink - absorb unreceived datagram */ --- 156,163 ---- } else { return (t_errlist[t_errno]); } ! } else ! return(strerror(errno)); } /* tli_sink - absorb unreceived datagram */ *** /usr/src/etc/tcpd/tli.c.old Tue Jan 3 13:26:04 1995 --- /usr/src/etc/tcpd/tli.c Sat Mar 23 22:02:15 1996 *************** *** 14,21 **** * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ ! #ifndef lint ! static char sccsid[] = "@(#) tli.c 1.14 95/01/03 22:26:03"; #endif #ifdef TLI --- 14,21 ---- * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ ! #if !defined(lint) && defined(DOSCCS) ! static char sccsid[] = "@(#) tli.c 1.14.1 96/03/23 22:26:03"; #endif #ifdef TLI *************** *** 40,47 **** extern char *nc_sperror(); extern int errno; - extern char *sys_errlist[]; - extern int sys_nerr; extern int t_errno; extern char *t_errlist[]; extern int t_nerr; --- 40,45 ---- *************** *** 304,317 **** } else { return (t_errlist[t_errno]); } ! } else { ! if (errno < 0 || errno >= sys_nerr) { ! sprintf(buf, "Unknown UNIX error %d", errno); ! return (buf); ! } else { ! return (sys_errlist[errno]); ! } ! } } /* tli_sink - absorb unreceived datagram */ --- 302,309 ---- } else { return (t_errlist[t_errno]); } ! } else ! return(strerror(errno)); } /* tli_sink - absorb unreceived datagram */ *** /usr/src/etc/telnetd.c.old Mon Jan 10 21:54:08 1994 --- /usr/src/etc/telnetd.c Fri Mar 22 23:01:16 1996 *************** *** 9,15 **** "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)telnetd.c 5.20.1 (Berkeley) 1/1/94"; #endif /* --- 9,15 ---- "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)telnetd.c 5.20.2 (2.11BSD) 1996/3/22"; #endif /* *************** *** 341,349 **** char *msg; { char buf[BUFSIZ]; - extern char *sys_errlist[]; ! (void) sprintf(buf, "%s: %s\r\n", msg, sys_errlist[errno]); fatal(f, buf); } --- 341,348 ---- char *msg; { char buf[BUFSIZ]; ! (void) sprintf(buf, "%s: %s\r\n", msg, strerror(errno)); fatal(f, buf); } *** /usr/src/games/hack/Makefile.old Sun Aug 30 13:33:03 1987 --- /usr/src/games/hack/Makefile Thu Mar 21 21:55:13 1996 *************** *** 1,3 **** --- 1,5 ---- + # #(@) Makefile 1.1 (2.11BSD) 1996/3/21 + # # Hack Overlay Makefile. # on some systems the termcap library is in -ltermcap *************** *** 10,19 **** GAMEUID = daemon CFLAGS = -O ! # We use a special chopped up version of sys_errlist that has much shorter ! # messages than normal to cut down the size hack's data space. ! ! HACKCSRC = errlst.c\ hack.Decl.c\ hack.apply.c hack.bones.c hack.c hack.cmd.c hack.do.c\ hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c hack.end.c\ --- 12,18 ---- GAMEUID = daemon CFLAGS = -O ! HACKCSRC = \ hack.Decl.c\ hack.apply.c hack.bones.c hack.c hack.cmd.c hack.do.c\ hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c hack.end.c\ *************** *** 44,50 **** # strings.o must be last in HOBJ since it can change when other files compile. ! HOBJ = errlst.o\ hack.Decl.o hack.apply.o hack.bones.o hack.o hack.cmd.o hack.do.o\ hack.do_name.o hack.do_wear.o hack.dog.o hack.eat.o hack.end.o\ hack.engrave.o hack.fight.o hack.invent.o hack.ioctl.o\ --- 43,49 ---- # strings.o must be last in HOBJ since it can change when other files compile. ! HOBJ = \ hack.Decl.o hack.apply.o hack.bones.o hack.o hack.cmd.o hack.do.o\ hack.do_name.o hack.do_wear.o hack.dog.o hack.eat.o hack.end.o\ hack.engrave.o hack.fight.o hack.invent.o hack.ioctl.o\ *************** *** 70,88 **** # bytes). The wise and cautious programmer would be well advised to use # size(1) heavily ... # ! BASE = errlst.o strings.o hack.monst.o hack.Decl.o\ ! hack.invent.o hack.dog.o hack.pri.o hack.mon.o\ hack.engrave.o rnd.o hack.track.o ! OV1 = hack.shk.o hack.topl.o hack.o hack.end.o hack.trap.o hack.ioctl.o OV2 = hack.do_wear.o hack.main.o hack.eat.o hack.timeout.o hack.vault.o\ hack.wizard.o hack.topl.o hack.tty.o\ hack.do.o hack.search.o alloc.o\ ! hack.cmd.o hack.termcap.o hack.unix.o OV3 = hack.do_name.o hack.fight.o hack.mkobj.o hack.o_init.o hack.mhitu.o\ ! hack.makemon.o hack.worn.o hack.rumors.o hack.objnam.o OV4 = hack.zap.o hack.read.o hack.apply.o hack.potion.o\ hack.options.o hack.pager.o hack.wield.o --- 69,87 ---- # bytes). The wise and cautious programmer would be well advised to use # size(1) heavily ... # ! BASE = strings.o hack.monst.o hack.Decl.o\ ! hack.invent.o hack.dog.o hack.mon.o\ hack.engrave.o rnd.o hack.track.o ! OV1 = hack.shk.o hack.topl.o hack.o hack.end.o hack.trap.o OV2 = hack.do_wear.o hack.main.o hack.eat.o hack.timeout.o hack.vault.o\ hack.wizard.o hack.topl.o hack.tty.o\ hack.do.o hack.search.o alloc.o\ ! hack.cmd.o hack.termcap.o hack.unix.o hack.ioctl.o OV3 = hack.do_name.o hack.fight.o hack.mkobj.o hack.o_init.o hack.mhitu.o\ ! hack.makemon.o hack.worn.o hack.rumors.o hack.objnam.o hack.pri.o OV4 = hack.zap.o hack.read.o hack.apply.o hack.potion.o\ hack.options.o hack.pager.o hack.wield.o *************** *** 92,98 **** hack.rip.o hack.bones.o hack.worm.o hack.steal.o hack.version.o # Crypt *MUST be listed BEFORE $(HOBJ) ! $(GAME): crypt $(HOBJ) Ovmakefile @echo "Loading ..." @ld -i -X -x -o $(GAME) /lib/crt0.o $(BASE)\ -Z $(OV1) -Z $(OV2) -Z $(OV3) -Z $(OV4) -Z $(OV5) -Y\ --- 91,97 ---- hack.rip.o hack.bones.o hack.worm.o hack.steal.o hack.version.o # Crypt *MUST be listed BEFORE $(HOBJ) ! $(GAME): crypt $(HOBJ) @echo "Loading ..." @ld -i -X -x -o $(GAME) /lib/crt0.o $(BASE)\ -Z $(OV1) -Z $(OV2) -Z $(OV3) -Z $(OV4) -Z $(OV5) -Y\ *************** *** 112,122 **** # Crypt is really crufty and slow, but the goal was to get something out the # door ... .c.o: ! cc -E $*.c | crypt | xstr -c - cc -c ${CFLAGS} x.c mv x.o $*.o - errlst.o: errlst.c rnd.o: rnd.c alloc.o: alloc.c --- 111,120 ---- # Crypt is really crufty and slow, but the goal was to get something out the # door ... .c.o: ! cc -E $*.c | ./crypt | xstr -c - cc -c ${CFLAGS} x.c mv x.o $*.o rnd.o: rnd.c alloc.o: alloc.c *************** *** 130,142 **** cc -o crypt crypt.c clean: ! rm -f *.o x.c xs.c strings makedefs: makedefs.c cc -o makedefs makedefs.c hack.onames.h: makedefs def.objects.h ! makedefs > hack.onames.h lint: # lint cannot have -p here because (i) capitals are meaningful: --- 128,140 ---- cc -o crypt crypt.c clean: ! rm -f *.o x.c xs.c strings crypt makedefs makedefs: makedefs.c cc -o makedefs makedefs.c hack.onames.h: makedefs def.objects.h ! ./makedefs > hack.onames.h lint: # lint cannot have -p here because (i) capitals are meaningful: *************** *** 211,227 **** # DO NOT DELETE THIS LINE hack.Decl.o: hack.h def.mkroom.h ! cc -E hack.Decl.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.Decl.o hack.apply.o: hack.h def.edog.h def.mkroom.h hack.bones.o: hack.h ! cc -E hack.bones.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.bones.o hack.o: hack.h hack.cmd.o: hack.h def.func_tab.h ! cc -E hack.cmd.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.cmd.o hack.do.o: hack.h --- 209,225 ---- # DO NOT DELETE THIS LINE hack.Decl.o: hack.h def.mkroom.h ! cc -E hack.Decl.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.Decl.o hack.apply.o: hack.h def.edog.h def.mkroom.h hack.bones.o: hack.h ! cc -E hack.bones.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.bones.o hack.o: hack.h hack.cmd.o: hack.h def.func_tab.h ! cc -E hack.cmd.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.cmd.o hack.do.o: hack.h *************** *** 229,241 **** hack.do_wear.o: hack.h hack.dog.o: hack.h hack.mfndpos.h def.edog.h def.mkroom.h hack.eat.o: hack.h ! cc -E hack.eat.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.eat.o hack.end.o: hack.h hack.engrave.o: hack.h hack.fight.o: hack.h ! cc -E hack.fight.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.fight.o hack.invent.o: hack.h def.wseg.h --- 227,239 ---- hack.do_wear.o: hack.h hack.dog.o: hack.h hack.mfndpos.h def.edog.h def.mkroom.h hack.eat.o: hack.h ! cc -E hack.eat.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.eat.o hack.end.o: hack.h hack.engrave.o: hack.h hack.fight.o: hack.h ! cc -E hack.fight.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.fight.o hack.invent.o: hack.h def.wseg.h *************** *** 242,248 **** hack.ioctl.o: config.h hack.lev.o: hack.h def.mkroom.h def.wseg.h hack.main.o: hack.h ! cc -E hack.main.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.main.o hack.makemon.o: hack.h --- 240,246 ---- hack.ioctl.o: config.h hack.lev.o: hack.h def.mkroom.h def.wseg.h hack.main.o: hack.h ! cc -E hack.main.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.main.o hack.makemon.o: hack.h *************** *** 250,256 **** hack.mklev.o: hack.h def.mkroom.h hack.mkmaze.o: hack.h def.mkroom.h hack.mkobj.o: hack.h ! cc -E hack.mkobj.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.mkobj.o hack.mkshop.o: hack.h def.mkroom.h def.eshk.h --- 248,254 ---- hack.mklev.o: hack.h def.mkroom.h hack.mkmaze.o: hack.h def.mkroom.h hack.mkobj.o: hack.h ! cc -E hack.mkobj.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.mkobj.o hack.mkshop.o: hack.h def.mkroom.h def.eshk.h *************** *** 264,270 **** hack.pri.o: hack.h def.wseg.h hack.read.o: hack.h hack.rip.o: hack.h ! cc -E hack.rip.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.rip.o hack.rumors.o: config.h --- 262,268 ---- hack.pri.o: hack.h def.wseg.h hack.read.o: hack.h hack.rip.o: hack.h ! cc -E hack.rip.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.rip.o hack.rumors.o: config.h *************** *** 278,284 **** hack.topl.o: hack.h hack.track.o: hack.h hack.trap.o: hack.h def.mkroom.h ! cc -E hack.trap.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.trap.o hack.tty.o: hack.h --- 276,282 ---- hack.topl.o: hack.h hack.track.o: hack.h hack.trap.o: hack.h def.mkroom.h ! cc -E hack.trap.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.trap.o hack.tty.o: hack.h *************** *** 287,293 **** hack.vault.o: hack.h def.mkroom.h hack.wield.o: hack.h hack.wizard.o: hack.h ! cc -E hack.wizard.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.wizard.o hack.worm.o: hack.h def.wseg.h --- 285,291 ---- hack.vault.o: hack.h def.mkroom.h hack.wield.o: hack.h hack.wizard.o: hack.h ! cc -E hack.wizard.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.wizard.o hack.worm.o: hack.h def.wseg.h *************** *** 294,300 **** hack.worn.o: hack.h hack.zap.o: hack.h hack.version.o: date.h ! cc -E hack.version.c | crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.version.o hack.h: config.h def.objclass.h def.monst.h def.gold.h def.trap.h def.obj.h def.flag.h def.rm.h def.permonst.h hack.onames.h --- 292,298 ---- hack.worn.o: hack.h hack.zap.o: hack.h hack.version.o: date.h ! cc -E hack.version.c | ./crypt | sed 's/^# \([0-9]*\)/#line \1/' > x.c cc -c ${CFLAGS} x.c mv x.o hack.version.o hack.h: config.h def.objclass.h def.monst.h def.gold.h def.trap.h def.obj.h def.flag.h def.rm.h def.permonst.h hack.onames.h *** /usr/src/games/mille/save.c.old Sat Jan 11 11:47:37 1986 --- /usr/src/games/mille/save.c Thu Mar 21 20:03:33 1996 *************** *** 1,4 **** --- 1,5 ---- #include "mille.h" + #include #include #include #ifndef unctrl *************** *** 11,30 **** # endif attron /* ! * @(#)save.c 1.2 (Berkeley) 3/28/83 */ typedef struct stat STAT; ! char *ctime(); - int read(), write(); - /* * This routine saves the current game for use at a later date */ extern int errno; - extern char *sys_errlist[]; save() { --- 12,29 ---- # endif attron /* ! * @(#)save.c 1.3 (2.11BSD) 1996/3/21 */ typedef struct stat STAT; ! extern char *ctime(); ! extern int read(), write(); /* * This routine saves the current game for use at a later date */ extern int errno; save() { *************** *** 78,84 **** return FALSE; if ((outf = creat(buf, 0644)) < 0) { ! error(sys_errlist[errno]); return FALSE; } mvwaddstr(Score, ERR_Y, ERR_X, buf); --- 77,83 ---- return FALSE; if ((outf = creat(buf, 0644)) < 0) { ! error(strerror(errno)); return FALSE; } mvwaddstr(Score, ERR_Y, ERR_X, buf); No differences encountered *** /usr/src/lib/libc/gen/Makefile.old Fri Feb 23 20:45:36 1996 --- /usr/src/lib/libc/gen/Makefile Wed Mar 20 20:40:13 1996 *************** *** 3,9 **** # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # ! # @(#)Makefile 5.7.5 (2.11BSD) 1996/02/23 # # Several routines have been rewritten in assembly language for the VAX and # the PDP. If you are not running on a VAX or PDP, you should use the --- 3,9 ---- # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # ! # @(#)Makefile 5.7.6 (2.11BSD) 1996/03/20 # # Several routines have been rewritten in assembly language for the VAX and # the PDP. If you are not running on a VAX or PDP, you should use the *************** *** 14,20 **** CFLAGS= -O ${DEFS} STDSRC= abort.c alarm.c atoi.c atol.c calloc.c closedir.c crypt.c \ ! ctime.c ctype_.c daemon.c devname.c disklabel.c err.c errlst.c \ execvp.c fakcu.c \ fstab.c gcvt.c getenv.c getgrent.c getgrgid.c getgrnam.c getlogin.c \ getpass.c getpwent.c getloadavg.c getmntinfo.c \ --- 14,20 ---- CFLAGS= -O ${DEFS} STDSRC= abort.c alarm.c atoi.c atol.c calloc.c closedir.c crypt.c \ ! ctime.c ctype_.c daemon.c devname.c disklabel.c err.c \ execvp.c fakcu.c \ fstab.c gcvt.c getenv.c getgrent.c getgrgid.c getgrnam.c getlogin.c \ getpass.c getpwent.c getloadavg.c getmntinfo.c \ *************** *** 25,34 **** setmode.c \ setenv.c seteuid.c setruid.c siglist.c signal.c siginterrupt.c \ sleep.c strcasecmp.c strftime.c swab.c sysctl.c syslog.c system.c \ telldir.c time.c timezone.c ttyname.c ttyslot.c ualarm.c usleep.c \ valloc.c strdup.c strsep.c uname.c wait.c wait3.c waitpid.c STDOBJ= abort.o alarm.o atoi.o atol.o calloc.o closedir.o crypt.o \ ! ctime.o ctype_.o daemon.o devname.o disklabel.o err.o errlst.o \ execvp.o fakcu.o \ fstab.o gcvt.o getenv.o getgrent.o getgrgid.o getgrnam.o getlogin.o \ getpass.o getpwent.o getloadavg.o getmntinfo.o \ --- 25,35 ---- setmode.c \ setenv.c seteuid.c setruid.c siglist.c signal.c siginterrupt.c \ sleep.c strcasecmp.c strftime.c swab.c sysctl.c syslog.c system.c \ + syserrlst.c \ telldir.c time.c timezone.c ttyname.c ttyslot.c ualarm.c usleep.c \ valloc.c strdup.c strsep.c uname.c wait.c wait3.c waitpid.c STDOBJ= abort.o alarm.o atoi.o atol.o calloc.o closedir.o crypt.o \ ! ctime.o ctype_.o daemon.o devname.o disklabel.o err.o \ execvp.o fakcu.o \ fstab.o gcvt.o getenv.o getgrent.o getgrgid.o getgrnam.o getlogin.o \ getpass.o getpwent.o getloadavg.o getmntinfo.o \ *************** *** 39,44 **** --- 40,46 ---- setmode.o \ setenv.o seteuid.o setruid.o siglist.o signal.o siginterrupt.o \ sleep.o strcasecmp.o strftime.o swab.o sysctl.o syslog.o system.o \ + syserrlst.o \ telldir.o time.o timezone.o ttyname.o ttyslot.o ualarm.o usleep.o \ valloc.o strdup.o strsep.o uname.o wait.o wait3.o waitpid.o *************** *** 108,114 **** devname.o: /usr/include/fcntl.h /usr/include/sys/types.h /usr/include/paths.h devname.o: /usr/include/stdio.h err.o: err.c /usr/include/stdio.h /usr/include/varargs.h - errlst.o: errlst.c execvp.o: execvp.c /usr/include/errno.h fakcu.o: fakcu.c fstab.o: fstab.c /usr/include/fstab.h /usr/include/stdio.h /usr/include/ctype.h --- 110,115 ---- *************** *** 161,167 **** devname.o: /usr/include/fcntl.h /usr/include/sys/types.h /usr/include/paths.h devname.o: /usr/include/stdio.h err.o: err.c /usr/include/stdio.h /usr/include/varargs.h - errlst.o: errlst.c execvp.o: execvp.c /usr/include/errno.h fakcu.o: fakcu.c fstab.o: fstab.c /usr/include/fstab.h /usr/include/stdio.h /usr/include/ctype.h --- 162,167 ---- *** /usr/src/lib/libc/string/Makefile.old Mon Jan 15 20:19:16 1996 --- /usr/src/lib/libc/string/Makefile Wed Mar 20 22:07:51 1996 *************** *** 1,5 **** # ! # @(#)Makefile 1.1 (2.11BSD GTE) 1995/1/15 # # This is the Makefile for the 'string' functions. New routines ported from # 4.4BSD's libc/string directory go here but existing libc/gen files are --- 1,5 ---- # ! # @(#)Makefile 1.2 (2.11BSD GTE) 1996/3/20 # # This is the Makefile for the 'string' functions. New routines ported from # 4.4BSD's libc/string directory go here but existing libc/gen files are *************** *** 10,17 **** CFLAGS= -O ${DEFS} CC= cc ! SRCS= strcspn.c strpbrk.c strsep.c strspn.c strstr.c strtok.c ! OBJS= strcspn.o strpbrk.o strsep.o strspn.o strstr.o strtok.o .c.o: ${CC} -p ${CFLAGS} -c $*.c --- 10,17 ---- CFLAGS= -O ${DEFS} CC= cc ! SRCS= strcspn.c strpbrk.c strerror.c strsep.c strspn.c strstr.c strtok.c ! OBJS= strcspn.o strpbrk.o strerror.o strsep.o strspn.o strstr.o strtok.o .c.o: ${CC} -p ${CFLAGS} -c $*.c *** /usr/src/lib/libkern/Makefile.old Sat Feb 3 20:32:04 1996 --- /usr/src/lib/libkern/Makefile Tue Mar 26 21:14:47 1996 *************** *** 1,5 **** # ! # @(#)Makefile 1.1 (2.11BSD GTE) 1996/2/3 # # This is the Makefile for 'libkern.a'. These are the specially compiled # versions of libc.a routines which the kernel and network use. --- 1,5 ---- # ! # @(#)Makefile 1.2 (2.11BSD GTE) 1996/3/26 # # This is the Makefile for 'libkern.a'. These are the specially compiled # versions of libc.a routines which the kernel and network use. *************** *** 44,50 **** depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} ! install: libkern.a install -o root -g bin -m 644 libkern.a ${DESTDIR}/usr/lib/libkern.a ranlib ${DESTDIR}/usr/lib/libkern.a --- 44,50 ---- depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} ! install: FRC libkern.a install -o root -g bin -m 644 libkern.a ${DESTDIR}/usr/lib/libkern.a ranlib ${DESTDIR}/usr/lib/libkern.a *** /usr/src/man/man3/Makefile.old Fri Feb 23 20:40:26 1996 --- /usr/src/man/man3/Makefile Thu Mar 28 21:31:08 1996 *************** *** 14,20 **** # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # ! # @(#)Makefile 5.4.9 (2.11BSD) 1996/2/23 # MDIR= /usr/man/cat3 SRCS1= abort.3 abs.3 alarm.3 asinh.3 assert.3 atof.3 bstring.3 byteorder.3 \ --- 14,20 ---- # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # ! # @(#)Makefile 5.4.10 (2.11BSD) 1996/3/20 # MDIR= /usr/man/cat3 SRCS1= abort.3 abs.3 alarm.3 asinh.3 assert.3 atof.3 bstring.3 byteorder.3 \ *************** *** 36,41 **** --- 36,42 ---- strcspn.3 strpbrk.3 strsep.3 strspn.3 strtol.3 strtoul.3 strstr.3 \ swab.3 sysctl.3 syslog.3 \ system.3 termcap.3 time.3 times.3 ttyname.3 ualarm.3 uname.3 ungetc.3 \ + syserrlst.3 \ usleep.3 utime.3 valloc.3 varargs.3 OBJS1= abort.0 abs.0 alarm.0 asinh.0 assert.0 atof.0 bstring.0 byteorder.0 \ compat-sys5.0 crypt.0 ctime.0 ctype.0 curses.0 dbm.0 daemon.0 \ *************** *** 56,61 **** --- 57,63 ---- strcspn.0 strpbrk.0 strsep.0 strspn.0 strtol.0 strtoul.0 strstr.0 \ swab.0 sysctl.0 syslog.0 \ system.0 termcap.0 time.0 times.0 ttyname.0 ualarm.0 uname.0 ungetc.0 \ + syserrlst.0 \ usleep.0 utime.0 valloc.0 varargs.0 REMO1= edata.0 etext.0 j1.0 jn.0 ns_addr.0 ns_ntoa.0 y0.0 y1.0 yn.0 acos.0 \ asin.0 atan.0 atan2.0 atoi.0 atol.0 cos.0 dbm_clearerr.0 dbm_close.0 \ *************** *** 74,85 **** REMO2= re_comp.0 re_exec.0 scalb.0 setkey.0 space.0 srand.0 tanh.0 \ timezone.0 toascii.0 tolower.0 toupper.0 ltol3.0 _longjmp.0 \ _setjmp.0 acosh.0 alloca.0 atanh.0 cabs.0 calloc.0 ceil.0 \ ! closelog.0 errlist.0 fabs.0 fdopen.0 free.0 freopen.0 fscanf.0 \ ftell.0 fwrite.0 index.0 initstate.0 longjmp.0 mkstemp.0 openlog.0 \ realloc.0 remque.0 rewind.0 rindex.0 rint.0 setegid.0 seteuid.0 \ setgid.0 setlogmask.0 setrgid.0 setruid.0 setstate.0 srandom.0 \ sscanf.0 strcat.0 strcmp.0 strcpy.0 strlen.0 strncat.0 strncmp.0 \ ! strncpy.0 strcasecmp.0 strncasecmp.0 sys.0 sys_errlist.0 sys_nerr.0 \ sprintf.0 vfprintf.0 vprintf.0 vsprintf.0 alphasort.0 bcmp.0 bcopy.0 \ bzero.0 clearerr.0 feof.0 fflush.0 ffs.0 fileno.0 fprintf.0 gamma.0 \ getdiskbyname.0 isatty.0 moncontrol.0 monstartup.0 setbuffer.0 \ --- 76,88 ---- REMO2= re_comp.0 re_exec.0 scalb.0 setkey.0 space.0 srand.0 tanh.0 \ timezone.0 toascii.0 tolower.0 toupper.0 ltol3.0 _longjmp.0 \ _setjmp.0 acosh.0 alloca.0 atanh.0 cabs.0 calloc.0 ceil.0 \ ! closelog.0 fabs.0 fdopen.0 free.0 freopen.0 fscanf.0 \ ftell.0 fwrite.0 index.0 initstate.0 longjmp.0 mkstemp.0 openlog.0 \ realloc.0 remque.0 rewind.0 rindex.0 rint.0 setegid.0 seteuid.0 \ setgid.0 setlogmask.0 setrgid.0 setruid.0 setstate.0 srandom.0 \ sscanf.0 strcat.0 strcmp.0 strcpy.0 strlen.0 strncat.0 strncmp.0 \ ! strncpy.0 strcasecmp.0 strncasecmp.0 \ ! strerror.0 \ sprintf.0 vfprintf.0 vprintf.0 vsprintf.0 alphasort.0 bcmp.0 bcopy.0 \ bzero.0 clearerr.0 feof.0 fflush.0 ffs.0 fileno.0 fprintf.0 gamma.0 \ getdiskbyname.0 isatty.0 moncontrol.0 monstartup.0 setbuffer.0 \ *************** *** 257,263 **** ln ${DESTDIR}${MDIR}/malloc.0 ${DESTDIR}${MDIR}/calloc.0 ln ${DESTDIR}${MDIR}/floor.0 ${DESTDIR}${MDIR}/ceil.0 ln ${DESTDIR}${MDIR}/syslog.0 ${DESTDIR}${MDIR}/closelog.0 ! ln ${DESTDIR}${MDIR}/perror.0 ${DESTDIR}${MDIR}/errlist.0 ln ${DESTDIR}${MDIR}/floor.0 ${DESTDIR}${MDIR}/fabs.0 ln ${DESTDIR}${MDIR}/fopen.0 ${DESTDIR}${MDIR}/fdopen.0 ln ${DESTDIR}${MDIR}/malloc.0 ${DESTDIR}${MDIR}/free.0 --- 260,266 ---- ln ${DESTDIR}${MDIR}/malloc.0 ${DESTDIR}${MDIR}/calloc.0 ln ${DESTDIR}${MDIR}/floor.0 ${DESTDIR}${MDIR}/ceil.0 ln ${DESTDIR}${MDIR}/syslog.0 ${DESTDIR}${MDIR}/closelog.0 ! ln ${DESTDIR}${MDIR}/perror.0 ${DESTDIR}${MDIR}/strerror.0 ln ${DESTDIR}${MDIR}/floor.0 ${DESTDIR}${MDIR}/fabs.0 ln ${DESTDIR}${MDIR}/fopen.0 ${DESTDIR}${MDIR}/fdopen.0 ln ${DESTDIR}${MDIR}/malloc.0 ${DESTDIR}${MDIR}/free.0 *************** *** 293,301 **** ln ${DESTDIR}${MDIR}/string.0 ${DESTDIR}${MDIR}/strncpy.0 ln ${DESTDIR}${MDIR}/string.0 ${DESTDIR}${MDIR}/strcasecmp.0 ln ${DESTDIR}${MDIR}/string.0 ${DESTDIR}${MDIR}/strncasecmp.0 - ln ${DESTDIR}${MDIR}/perror.0 ${DESTDIR}${MDIR}/sys.0 - ln ${DESTDIR}${MDIR}/perror.0 ${DESTDIR}${MDIR}/sys_errlist.0 - ln ${DESTDIR}${MDIR}/perror.0 ${DESTDIR}${MDIR}/sys_nerr.0 ln ${DESTDIR}${MDIR}/printf.0 ${DESTDIR}${MDIR}/sprintf.0 ln ${DESTDIR}${MDIR}/printf.0 ${DESTDIR}${MDIR}/vfprintf.0 ln ${DESTDIR}${MDIR}/printf.0 ${DESTDIR}${MDIR}/vprintf.0 --- 296,301 ---- *** /usr/src/man/man3/perror.3.old Sun Dec 14 15:07:20 1986 --- /usr/src/man/man3/perror.3 Thu Mar 21 22:29:00 1996 *************** *** 2,48 **** .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" ! .\" @(#)perror.3 6.1 (Berkeley) 5/15/85 .\" ! .TH PERROR 3 "May 15, 1985" .UC 4 .SH NAME ! perror, sys_errlist, sys_nerr \- system error messages .SH SYNOPSIS .nf .B perror(s) .B char *s; ! .PP ! .B int sys_nerr; ! .B char *sys_errlist[]; .fi .SH DESCRIPTION ! .I Perror ! produces a short error message on the standard error file ! describing the last error encountered during a call ! to the system from a C program. ! First the argument string ! .I s ! is printed, then a colon, then the message and a new-line. ! Most usefully, the argument string is the name ! of the program which incurred the error. ! The error number is taken from the external variable ! .I errno ! (see ! .IR intro (2)), ! which is set when errors occur but not cleared when ! non-erroneous calls are made. .PP ! To simplify variant formatting of messages, the vector of message strings ! .I sys_errlist ! is provided; .I errno ! can be used as an index in this table to get the ! message string without the newline. ! .I Sys_nerr ! is the number of messages provided for in the table; ! it should be checked because new error codes may be added to the system before ! they are added to the table. .SH "SEE ALSO" intro(2), ! psignal(3) --- 2,80 ---- .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" ! .\" @(#)perror.3 6.1.1 (2.11BSD) 1996/3/21 .\" ! .TH PERROR 3 "March 21, 1996" .UC 4 .SH NAME ! perror, strerror \- system error messages .SH SYNOPSIS .nf .B perror(s) .B char *s; ! .sp ! .B #include ! .sp ! .I char * ! .B strerror(errnum) ! .B int errnum; .fi .SH DESCRIPTION ! The ! .B strerror() ! and ! .B perror() ! functions look up the error message string corresponding to an error number. .PP ! The ! .B strerror() ! function accepts an error number argument ! .I errnum ! and returns a pointer to the corresponding message string. ! .PP ! The ! .B perror() ! function ! finds the error message corresponding to the current value of the ! global variable .I errno ! (intro(2)) and writes it, followed by a newline, to the standard error ! file descriptor. If the argument ! .I string ! is non-NULL, it is prepended to the message string and separated ! from it by a colon and space (`: '). ! If ! .I string ! is NULL, only the error message string is printed. ! .PP ! If ! .I errnum ! is not a recognized error number, the error message string ! will contain ``Unknown error: '' followed by the error number ! in decimal. ! .PP ! The error messages are stored in a data file now rather than an in memory ! array. See ! .BR syserror (5). .SH "SEE ALSO" + mkerrlst(1), intro(2), ! psignal(3), ! strerror(3), ! syserror(3), ! syserror(5) ! .SH BUGS ! The ! .BR strerror () ! function returns its result in a static buffer which may be ! overwritten by subsequent calls. ! .PP ! The array ! .B sys_errlist[] ! and the global ! .B sys_nerr ! are ! .B obsolete ! and should not be used. They have, for the time being, been placed in ! an object library ! .BR liberrlst.a . *** /usr/src/man/man5/Makefile.old Thu Jan 25 23:41:20 1996 --- /usr/src/man/man5/Makefile Wed Mar 20 20:42:05 1996 *************** *** 14,20 **** # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # ! # @(#)Makefile 5.4.2 (2.11BSD GTE) 1996/1/25 # MDIR= /usr/man/cat5 SRCS= L-devices.5 L-dialcodes.5 L.aliases.5 L.cmds.5 L.sys.5 \ --- 14,20 ---- # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # ! # @(#)Makefile 5.4.3 (2.11BSD GTE) 1996/3/20 # MDIR= /usr/man/cat5 SRCS= L-devices.5 L-dialcodes.5 L.aliases.5 L.cmds.5 L.sys.5 \ *************** *** 23,28 **** --- 23,29 ---- group.5 hosts.5 map3270.5 networks.5 passwd.5 \ phones.5 plot.5 printcap.5 protocols.5 remote.5 resolver.5 \ services.5 shells.5 stack.5 tar.5 termcap.5 tp.5 ttys.5 types.5 \ + syserrlst.5 \ tzfile.5 utmp.5 uuencode.5 vfont.5 vgrindefs.5 OBJS= L-devices.0 L-dialcodes.0 L.aliases.0 L.cmds.0 L.sys.0 \ USERFILE.0 a.out.0 acct.0 aliases.0 core.0 dbx.0 \ *************** *** 30,35 **** --- 31,37 ---- group.0 hosts.0 map3270.0 networks.0 passwd.0 \ phones.0 plot.0 printcap.0 protocols.0 remote.0 resolver.0 \ services.0 shells.0 stack.0 tar.0 termcap.0 tp.0 ttys.0 types.0 \ + syserrlst.0 \ tzfile.0 utmp.0 uuencode.0 vfont.0 vgrindefs.0 .SUFFIXES: .5 .0