From: Nick Downing Date: Thu, 19 Jan 2017 09:38:10 +0000 (+1100) Subject: More int->void fixups and function pointer argument types added with __P((...)) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=779a8712e6d3fe7163133db152db702f30dd3910;p=43bsd.git More int->void fixups and function pointer argument types added with __P((...)) --- diff --git a/lib/libstdc/gen.h b/lib/libstdc/gen.h index 99a454a..8f6f71d 100644 --- a/lib/libstdc/gen.h +++ b/lib/libstdc/gen.h @@ -108,7 +108,7 @@ int mkstemp __P((char *as)); char *mktemp __P((char *as)); /* gen/qsort.c */ -void qsort __P((char *base, int n, int size, int (*compar)(void))); +void qsort __P((void *_base, int n, int size, int (*compar)(void *p0, void *p1))); /* gen/random.c */ int srandom __P((unsigned x)); diff --git a/lib/libstdc/gen/qsort.c b/lib/libstdc/gen/qsort.c index fa7bc05..0ade312 100644 --- a/lib/libstdc/gen/qsort.c +++ b/lib/libstdc/gen/qsort.c @@ -36,7 +36,8 @@ static int mthresh; /* MTHRESHold in chars */ static void qst __P((char *base, char *max)); -void qsort(base, n, size, compar) char *base; int n; int size; int (*compar)(); { +void qsort(_base, n, size, compar) void *_base; int n; int size; int (*compar) __P((void *p0, void *p1)); { +#define base ((char *)_base) register char c, *i, *j, *lo, *hi; char *min, *max; @@ -89,6 +90,7 @@ void qsort(base, n, size, compar) char *base; int n; int size; int (*compar)(); } } } +#undef base } /* diff --git a/lib/libstdc/gen/scandir.c b/lib/libstdc/gen/scandir.c index 32087b0..c9426fa 100644 --- a/lib/libstdc/gen/scandir.c +++ b/lib/libstdc/gen/scandir.c @@ -24,7 +24,7 @@ static char sccsid[] = "@(#)scandir.c 5.2 (Berkeley) 3/9/86"; /*#include */ /*#include */ -int scandir(dirname, namelist, select, dcomp) char *dirname; struct direct *(*namelist[]); int (*select)(); int (*dcomp)(); { +int scandir(dirname, namelist, select, dcomp) char *dirname; struct direct *(*namelist[]); int (*select) __P((struct direct *d)); int (*dcomp) __P((struct direct *d0, struct direct *d1)); { register struct direct *d, *p, **names; register int nitems; register char *cp1, *cp2; @@ -77,7 +77,7 @@ int scandir(dirname, namelist, select, dcomp) char *dirname; struct direct *(*na } closedir(dirp); if (nitems && dcomp != NULL) - qsort(names, nitems, sizeof(struct direct *), dcomp); + qsort(names, nitems, sizeof(struct direct *), (int (*) __P((void *p0, void *p1)))dcomp); *namelist = names; return(nitems); } diff --git a/lib/libstdc/post.patch b/lib/libstdc/post.patch index 572a7dc..05e35c5 100644 --- a/lib/libstdc/post.patch +++ b/lib/libstdc/post.patch @@ -1,20 +1,18 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/getpass.c libstdc/gen/getpass.c ---- libstdc.post/gen/getpass.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/getpass.c 2017-01-19 19:52:29.473745954 +1100 -@@ -19,8 +19,8 @@ - register c; +--- libstdc.post/gen/getpass.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/getpass.c 2017-01-19 20:27:34.549174475 +1100 +@@ -20,7 +20,7 @@ FILE *fi; static char pbuf[9]; -- int (*signal())(); -- int (*sig)(); -+ void (*signal())(); + void (*signal())(); +- void (*sig)(); + void (*sig) __P((int sig)); if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL) fi = stdin; diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/getpwnamuid.c libstdc/gen/getpwnamuid.c ---- libstdc.post/gen/getpwnamuid.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/getpwnamuid.c 2017-01-19 19:33:39.576148388 +1100 +--- libstdc.post/gen/getpwnamuid.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/getpwnamuid.c 2017-01-19 20:27:34.549174475 +1100 @@ -44,19 +44,37 @@ cp = key.dptr; tp = line; @@ -54,8 +52,8 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post } diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/malloc.c libstdc/gen/malloc.c ---- libstdc.post/gen/malloc.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/malloc.c 2017-01-19 19:50:11.021555474 +1100 +--- libstdc.post/gen/malloc.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/malloc.c 2017-01-19 20:27:34.549174475 +1100 @@ -88,9 +88,6 @@ #if defined(DEBUG) || defined(RCHECK) #define ASSERT(p) if (!(p)) botch("p") @@ -76,8 +74,8 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post register union overhead *op; register int bucket; diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/ndbm.c libstdc/gen/ndbm.c ---- libstdc.post/gen/ndbm.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/ndbm.c 2017-01-19 19:01:05.945769610 +1100 +--- libstdc.post/gen/ndbm.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/ndbm.c 2017-01-19 20:27:34.549174475 +1100 @@ -70,14 +70,14 @@ flags = (flags & ~03) | O_RDWR; strcpy(db->dbm_pagbuf, file); @@ -95,14 +93,47 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post db->dbm_dirf = vopen(db->dbm_pagbuf, flags, argp); va_end(argp); if (db->dbm_dirf < 0) +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/qsort.c libstdc/gen/qsort.c +--- libstdc.post/gen/qsort.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/qsort.c 2017-01-19 20:34:36.613797634 +1100 +@@ -36,7 +36,7 @@ + + static void qst __P((char *base, char *max)); + +-void qsort(_base, n, size, compar) void *_base; int n; int size; int (*compar)(); { ++void qsort(_base, n, size, compar) void *_base; int n; int size; int (*compar) __P((void *p0, void *p1)); { + #define base ((char *)_base) + register char c, *i, *j, *lo, *hi; + char *min, *max; +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/scandir.c libstdc/gen/scandir.c +--- libstdc.post/gen/scandir.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/scandir.c 2017-01-19 20:35:26.941870907 +1100 +@@ -24,7 +24,7 @@ + /*#include */ + /*#include */ + +-int scandir(dirname, namelist, select, dcomp) char *dirname; struct direct *(*namelist[]); int (*select)(); int (*dcomp)(); { ++int scandir(dirname, namelist, select, dcomp) char *dirname; struct direct *(*namelist[]); int (*select) __P((struct direct *d)); int (*dcomp) __P((struct direct *d0, struct direct *d1)); { + register struct direct *d, *p, **names; + register int nitems; + register char *cp1, *cp2; +@@ -77,7 +77,7 @@ + } + closedir(dirp); + if (nitems && dcomp != NULL) +- qsort(names, nitems, sizeof(struct direct *), dcomp); ++ qsort(names, nitems, sizeof(struct direct *), (int (*) __P((void *p0, void *p1)))dcomp); + *namelist = names; + return(nitems); + } diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/signal.c libstdc/gen/signal.c ---- libstdc.post/gen/signal.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/signal.c 2017-01-19 19:57:04.134157518 +1100 +--- libstdc.post/gen/signal.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/signal.c 2017-01-19 20:27:34.549174475 +1100 @@ -15,12 +15,12 @@ */ /*#include */ --int (*signal(s, a))() int s; int (*a)(); { +-void (*signal(s, a))() int s; void (*a)(); { +void (*signal(s, a)) __P((int sig)) int s; void (*a) __P((int sig)); { struct sigvec osv, sv; static int mask[NSIG]; @@ -121,8 +152,8 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post + return ((void (*) __P((int sig)))osv.sv_handler); } diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/sleep.c libstdc/gen/sleep.c ---- libstdc.post/gen/sleep.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/sleep.c 2017-01-19 19:59:30.182439248 +1100 +--- libstdc.post/gen/sleep.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/sleep.c 2017-01-19 20:27:34.549174475 +1100 @@ -15,7 +15,7 @@ /*#include */ @@ -133,20 +164,20 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post static int ringring; diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/system.c libstdc/gen/system.c ---- libstdc.post/gen/system.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/system.c 2017-01-19 19:54:32.589914213 +1100 +--- libstdc.post/gen/system.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/system.c 2017-01-19 20:27:34.549174475 +1100 @@ -11,7 +11,7 @@ int system(s) char *s; { int status, pid, w; -- register int (*istat)(), (*qstat)(); +- register void (*istat)(), (*qstat)(); + register void (*istat) __P((int sig)), (*qstat) __P((int sig)); if ((pid = vfork()) == 0) { execl("/bin/sh", "sh", "-c", s, 0); diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen/usleep.c libstdc/gen/usleep.c ---- libstdc.post/gen/usleep.c 2017-01-19 18:06:10.766147943 +1100 -+++ libstdc/gen/usleep.c 2017-01-19 19:59:53.198483240 +1100 +--- libstdc.post/gen/usleep.c 2017-01-19 20:27:34.541174464 +1100 ++++ libstdc/gen/usleep.c 2017-01-19 20:27:34.549174475 +1100 @@ -18,7 +18,7 @@ #define TICK 10000 /* system clock resolution in microseconds */ @@ -156,9 +187,33 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post static int ringring; +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/gen.h libstdc/gen.h +--- libstdc.post/gen.h 2017-01-19 20:27:34.517174428 +1100 ++++ libstdc/gen.h 2017-01-19 20:34:55.509825172 +1100 +@@ -108,7 +108,7 @@ + char *mktemp __P((char *as)); + + /* gen/qsort.c */ +-void qsort __P((void *_base, int n, int size, int (*compar)(void))); ++void qsort __P((void *_base, int n, int size, int (*compar)(void *p0, void *p1))); + + /* gen/random.c */ + int srandom __P((unsigned x)); +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/sys/dir.h libstdc/sys/dir.h +--- libstdc.post/sys/dir.h 2017-01-19 20:27:34.525174440 +1100 ++++ libstdc/sys/dir.h 2017-01-19 20:34:05.461752173 +1100 +@@ -122,7 +122,7 @@ + struct direct *readdir __P((register DIR *dirp)); + + /* gen/scandir.c */ +-int scandir __P((char *dirname, struct direct *(*namelist[]), int (*select)(void), int (*dcomp)(void))); ++int scandir __P((char *dirname, struct direct *(*namelist[]), int (*select)(struct direct *d), int (*dcomp)(struct direct *d0, struct direct *d1))); + int alphasort __P((struct direct **d1, struct direct **d2)); + + /* gen/seekdir.c */ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post/sys/signal.h libstdc/sys/signal.h ---- libstdc.post/sys/signal.h 2017-01-19 18:06:10.750147931 +1100 -+++ libstdc/sys/signal.h 2017-01-19 19:58:50.938363964 +1100 +--- libstdc.post/sys/signal.h 2017-01-19 20:27:34.525174440 +1100 ++++ libstdc/sys/signal.h 2017-01-19 20:27:34.549174475 +1100 @@ -9,7 +9,7 @@ * @(#)signal.h 7.1 (Berkeley) 6/4/86 */ @@ -172,7 +227,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post #define SIGUSR2 31 /* user defined signal 2 */ #ifndef KERNEL --int (*signal())(); +-void (*signal())(); +/*void (*signal())();*/ #endif @@ -191,7 +246,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post +struct sigcontext; /* forward reference for sv_handler below (in ANSI case) */ + struct sigvec { -- int (*sv_handler)(); /* signal handler */ +- void (*sv_handler)(); /* signal handler */ + void (*sv_handler) __P((int sig, int code, struct sigcontext *scp)); /* signal handler */ int sv_mask; /* signal mask to apply */ int sv_flags; /* see signal options below */ @@ -200,16 +255,16 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post int sc_ps; /* psl to restore */ }; --#define BADSIG (int (*)())-1 --#define SIG_DFL (int (*)())0 --#define SIG_IGN (int (*)())1 +-#define BADSIG (void (*)())-1 +-#define SIG_DFL (void (*)())0 +-#define SIG_IGN (void (*)())1 +#define BADSIG (void (*) __P((int sig)))-1 +#define SIG_DFL (void (*) __P((int sig)))0 +#define SIG_IGN (void (*) __P((int sig)))1 #ifdef KERNEL --#define SIG_CATCH (int (*)())2 --#define SIG_HOLD (int (*)())3 +-#define SIG_CATCH (void (*)())2 +-#define SIG_HOLD (void (*)())3 -#endif +#define SIG_CATCH (void (*) __P((int sig)))2 +#define SIG_HOLD (void (*) __P((int sig)))3 @@ -237,7 +292,7 @@ diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.post int siginterrupt __P((int sig, int flag)); /* gen/signal.c */ --int (*signal __P((int s, int (*a)(void)))) __P((void)); +-void (*signal __P((int s, void (*a)(void)))) __P((void)); +void (*signal __P((int s, void (*a)(int sig)))) __P((int sig)); /* sys/kill.c */ diff --git a/lib/libstdc/pre.patch b/lib/libstdc/pre.patch index b74778d..9df084e 100644 --- a/lib/libstdc/pre.patch +++ b/lib/libstdc/pre.patch @@ -1,6 +1,6 @@ -diff --unified --recursive --new-file libstdc.pre/compat-4.1/ftime.c libstdc/compat-4.1/ftime.c ---- libstdc.pre/compat-4.1/ftime.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/compat-4.1/ftime.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-4.1/ftime.c libstdc/compat-4.1/ftime.c +--- libstdc.pre/compat-4.1/ftime.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/compat-4.1/ftime.c 2017-01-19 20:25:11.480959550 +1100 @@ -10,18 +10,20 @@ #include @@ -28,9 +28,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-4.1/ftime.c libstdc/com ftime(tp) register struct timeb *tp; { -diff --unified --recursive --new-file libstdc.pre/compat-4.1/gtty.c libstdc/compat-4.1/gtty.c ---- libstdc.pre/compat-4.1/gtty.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/compat-4.1/gtty.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-4.1/gtty.c libstdc/compat-4.1/gtty.c +--- libstdc.pre/compat-4.1/gtty.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/compat-4.1/gtty.c 2017-01-19 20:25:11.480959550 +1100 @@ -15,7 +15,7 @@ #include @@ -40,9 +40,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-4.1/gtty.c libstdc/comp return(ioctl(fd, TIOCGETP, ap)); } -diff --unified --recursive --new-file libstdc.pre/compat-4.1/stty.c libstdc/compat-4.1/stty.c ---- libstdc.pre/compat-4.1/stty.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/compat-4.1/stty.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-4.1/stty.c libstdc/compat-4.1/stty.c +--- libstdc.pre/compat-4.1/stty.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/compat-4.1/stty.c 2017-01-19 20:25:11.480959550 +1100 @@ -15,7 +15,7 @@ #include @@ -52,9 +52,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-4.1/stty.c libstdc/comp return(ioctl(fd, TIOCSETP, ap)); } -diff --unified --recursive --new-file libstdc.pre/compat-4.1/times.c libstdc/compat-4.1/times.c ---- libstdc.pre/compat-4.1/times.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/compat-4.1/times.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-4.1/times.c libstdc/compat-4.1/times.c +--- libstdc.pre/compat-4.1/times.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/compat-4.1/times.c 2017-01-19 20:25:11.480959550 +1100 @@ -10,16 +10,18 @@ #include @@ -80,9 +80,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-4.1/times.c libstdc/com times(tmsp) register struct tms *tmsp; { -diff --unified --recursive --new-file libstdc.pre/compat-4.1/vtimes.c libstdc/compat-4.1/vtimes.c ---- libstdc.pre/compat-4.1/vtimes.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/compat-4.1/vtimes.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-4.1/vtimes.c libstdc/compat-4.1/vtimes.c +--- libstdc.pre/compat-4.1/vtimes.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/compat-4.1/vtimes.c 2017-01-19 20:25:11.480959550 +1100 @@ -10,23 +10,25 @@ #include @@ -121,9 +121,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-4.1/vtimes.c libstdc/co vtimes(par, chi) register struct vtimes *par, *chi; { -diff --unified --recursive --new-file libstdc.pre/compat-sys5/memccpy.c libstdc/compat-sys5/memccpy.c ---- libstdc.pre/compat-sys5/memccpy.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/compat-sys5/memccpy.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-sys5/memccpy.c libstdc/compat-sys5/memccpy.c +--- libstdc.pre/compat-sys5/memccpy.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/compat-sys5/memccpy.c 2017-01-19 20:25:11.480959550 +1100 @@ -13,11 +13,15 @@ #endif @@ -142,9 +142,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-sys5/memccpy.c libstdc/ +#undef t +#undef f } -diff --unified --recursive --new-file libstdc.pre/compat-sys5/memchr.c libstdc/compat-sys5/memchr.c ---- libstdc.pre/compat-sys5/memchr.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/compat-sys5/memchr.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-sys5/memchr.c libstdc/compat-sys5/memchr.c +--- libstdc.pre/compat-sys5/memchr.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/compat-sys5/memchr.c 2017-01-19 20:25:11.480959550 +1100 @@ -12,12 +12,14 @@ static char sccsid[] = "@(#)memchr.c 5.2 (Berkeley) 86/03/09"; #endif @@ -163,9 +163,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-sys5/memchr.c libstdc/c return (0); +#undef s } -diff --unified --recursive --new-file libstdc.pre/compat-sys5/memcmp.c libstdc/compat-sys5/memcmp.c ---- libstdc.pre/compat-sys5/memcmp.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/compat-sys5/memcmp.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-sys5/memcmp.c libstdc/compat-sys5/memcmp.c +--- libstdc.pre/compat-sys5/memcmp.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/compat-sys5/memcmp.c 2017-01-19 20:25:11.480959550 +1100 @@ -12,11 +12,15 @@ static char sccsid[] = "@(#)memcmp.c 5.2 (Berkeley) 86/03/09"; #endif @@ -184,9 +184,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-sys5/memcmp.c libstdc/c +#undef s1 +#undef s2 } -diff --unified --recursive --new-file libstdc.pre/compat-sys5/memcpy.c libstdc/compat-sys5/memcpy.c ---- libstdc.pre/compat-sys5/memcpy.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/compat-sys5/memcpy.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-sys5/memcpy.c libstdc/compat-sys5/memcpy.c +--- libstdc.pre/compat-sys5/memcpy.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/compat-sys5/memcpy.c 2017-01-19 20:25:11.480959550 +1100 @@ -12,14 +12,18 @@ static char sccsid[] = "@(#)memcpy.c 5.2 (Berkeley) 86/03/09"; #endif @@ -209,9 +209,9 @@ diff --unified --recursive --new-file libstdc.pre/compat-sys5/memcpy.c libstdc/c +#undef t +#undef f } -diff --unified --recursive --new-file libstdc.pre/compat-sys5/memset.c libstdc/compat-sys5/memset.c ---- libstdc.pre/compat-sys5/memset.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/compat-sys5/memset.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/compat-sys5/memset.c libstdc/compat-sys5/memset.c +--- libstdc.pre/compat-sys5/memset.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/compat-sys5/memset.c 2017-01-19 20:25:11.480959550 +1100 @@ -12,14 +12,16 @@ static char sccsid[] = "@(#)memset.c 5.2 (Berkeley) 86/03/09"; #endif @@ -232,8 +232,8 @@ diff --unified --recursive --new-file libstdc.pre/compat-sys5/memset.c libstdc/c return (p); +#undef s } -diff --unified --recursive --new-file libstdc.pre/fcntl.h libstdc/fcntl.h ---- libstdc.pre/fcntl.h 2017-01-19 18:01:22.225941066 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/fcntl.h libstdc/fcntl.h +--- libstdc.pre/fcntl.h 2017-01-19 20:25:11.472959537 +1100 +++ libstdc/fcntl.h 1970-01-01 10:00:00.000000000 +1000 @@ -1,40 +0,0 @@ -/* @@ -276,9 +276,9 @@ diff --unified --recursive --new-file libstdc.pre/fcntl.h libstdc/fcntl.h -#define FTRUNC 02000 /* truncate to zero length */ -#define FEXCL 04000 /* error if already created */ -#endif -diff --unified --recursive --new-file libstdc.pre/gen/bcmp.c libstdc/gen/bcmp.c ---- libstdc.pre/gen/bcmp.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/bcmp.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/bcmp.c libstdc/gen/bcmp.c +--- libstdc.pre/gen/bcmp.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/bcmp.c 2017-01-19 20:25:11.480959550 +1100 @@ -11,10 +11,11 @@ /* * bcmp -- vax cmpc3 instruction @@ -301,9 +301,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/bcmp.c libstdc/gen/bcmp.c +#undef b1 +#undef b2 } -diff --unified --recursive --new-file libstdc.pre/gen/bcopy.c libstdc/gen/bcopy.c ---- libstdc.pre/gen/bcopy.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/bcopy.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/bcopy.c libstdc/gen/bcopy.c +--- libstdc.pre/gen/bcopy.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/bcopy.c 2017-01-19 20:25:11.480959550 +1100 @@ -11,9 +11,11 @@ /* * bcopy -- vax movc3 instruction @@ -340,9 +340,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/bcopy.c libstdc/gen/bcopy. +#undef src +#undef dst } -diff --unified --recursive --new-file libstdc.pre/gen/bzero.c libstdc/gen/bzero.c ---- libstdc.pre/gen/bzero.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/bzero.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/bzero.c libstdc/gen/bzero.c +--- libstdc.pre/gen/bzero.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/bzero.c 2017-01-19 20:25:11.480959550 +1100 @@ -11,13 +11,14 @@ /* * bzero -- vax movc5 instruction @@ -361,9 +361,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/bzero.c libstdc/gen/bzero. return(length); +#undef b } -diff --unified --recursive --new-file libstdc.pre/gen/calloc.c libstdc/gen/calloc.c ---- libstdc.pre/gen/calloc.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/calloc.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/calloc.c libstdc/gen/calloc.c +--- libstdc.pre/gen/calloc.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/calloc.c 2017-01-19 20:25:11.480959550 +1100 @@ -5,11 +5,11 @@ /* * Calloc - allocate and clear memory block @@ -388,9 +388,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/calloc.c libstdc/gen/callo unsigned num; unsigned size; { free(p); -diff --unified --recursive --new-file libstdc.pre/gen/fakcu.c libstdc/gen/fakcu.c ---- libstdc.pre/gen/fakcu.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/fakcu.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/fakcu.c libstdc/gen/fakcu.c +--- libstdc.pre/gen/fakcu.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/fakcu.c 2017-01-19 20:25:11.480959550 +1100 @@ -6,5 +6,6 @@ * Null cleanup routine to resolve reference in exit() * if not using stdio. @@ -398,9 +398,23 @@ diff --unified --recursive --new-file libstdc.pre/gen/fakcu.c libstdc/gen/fakcu. +void _cleanup() { } -diff --unified --recursive --new-file libstdc.pre/gen/getusershell.c libstdc/gen/getusershell.c ---- libstdc.pre/gen/getusershell.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/getusershell.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/getpass.c libstdc/gen/getpass.c +--- libstdc.pre/gen/getpass.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/gen/getpass.c 2017-01-19 20:25:11.480959550 +1100 +@@ -15,8 +15,8 @@ + register c; + FILE *fi; + static char pbuf[9]; +- int (*signal())(); +- int (*sig)(); ++ void (*signal())(); ++ void (*sig)(); + + if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL) + fi = stdin; +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/getusershell.c libstdc/gen/getusershell.c +--- libstdc.pre/gen/getusershell.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/getusershell.c 2017-01-19 20:25:11.480959550 +1100 @@ -62,7 +62,7 @@ register char **sp, *cp; register FILE *fp; @@ -419,9 +433,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/getusershell.c libstdc/gen (void)fclose(fp); return(okshells); } -diff --unified --recursive --new-file libstdc.pre/gen/insque.c libstdc/gen/insque.c ---- libstdc.pre/gen/insque.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/insque.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/insque.c libstdc/gen/insque.c +--- libstdc.pre/gen/insque.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/gen/insque.c 2017-01-19 20:25:11.480959550 +1100 @@ -8,16 +8,19 @@ static char sccsid[] = "@(#)insque.c 5.1 (Berkeley) 1/27/87"; #endif @@ -446,8 +460,8 @@ diff --unified --recursive --new-file libstdc.pre/gen/insque.c libstdc/gen/insqu insque(e, prev) register struct vaxque *e, *prev; { -diff --unified --recursive --new-file libstdc.pre/gen/isatty.c libstdc/gen/isatty.c ---- libstdc.pre/gen/isatty.c 2017-01-19 18:01:22.233941072 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/isatty.c libstdc/gen/isatty.c +--- libstdc.pre/gen/isatty.c 2017-01-19 20:25:11.476959544 +1100 +++ libstdc/gen/isatty.c 1970-01-01 10:00:00.000000000 +1000 @@ -1,17 +0,0 @@ -#if defined(LIBC_SCCS) && !defined(lint) @@ -467,9 +481,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/isatty.c libstdc/gen/isatt - return(0); - return(1); -} -diff --unified --recursive --new-file libstdc.pre/gen/malloc.c libstdc/gen/malloc.c ---- libstdc.pre/gen/malloc.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/malloc.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/malloc.c libstdc/gen/malloc.c +--- libstdc.pre/gen/malloc.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/malloc.c 2017-01-19 20:25:11.480959550 +1100 @@ -82,7 +82,7 @@ #if defined(DEBUG) || defined(RCHECK) #define ASSERT(p) if (!(p)) botch("p") @@ -527,9 +541,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/malloc.c libstdc/gen/mallo mstats(s) char *s; { register int i, j; -diff --unified --recursive --new-file libstdc.pre/gen/ndbm.c libstdc/gen/ndbm.c ---- libstdc.pre/gen/ndbm.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/ndbm.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/ndbm.c libstdc/gen/ndbm.c +--- libstdc.pre/gen/ndbm.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/ndbm.c 2017-01-19 20:25:11.480959550 +1100 @@ -14,6 +14,7 @@ #include #include @@ -571,9 +585,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/ndbm.c libstdc/gen/ndbm.c if (db->dbm_dirf < 0) goto bad1; fstat(db->dbm_dirf, &statb); -diff --unified --recursive --new-file libstdc.pre/gen/perror.c libstdc/gen/perror.c ---- libstdc.pre/gen/perror.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/perror.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/perror.c libstdc/gen/perror.c +--- libstdc.pre/gen/perror.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/gen/perror.c 2017-01-19 20:25:11.480959550 +1100 @@ -17,7 +17,7 @@ int errno; @@ -583,8 +597,8 @@ diff --unified --recursive --new-file libstdc.pre/gen/perror.c libstdc/gen/perro perror(s) char *s; { struct iovec iov[4]; -diff --unified --recursive --new-file libstdc.pre/gen/popen.c libstdc/gen/popen.c ---- libstdc.pre/gen/popen.c 2017-01-19 18:01:22.233941072 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/popen.c libstdc/gen/popen.c +--- libstdc.pre/gen/popen.c 2017-01-19 20:25:11.480959550 +1100 +++ libstdc/gen/popen.c 1970-01-01 10:00:00.000000000 +1000 @@ -1,77 +0,0 @@ -/* @@ -664,18 +678,34 @@ diff --unified --recursive --new-file libstdc.pre/gen/popen.c libstdc/gen/popen. - (void) sigsetmask(omask); - return (pid == -1 ? -1 : status); -} -diff --unified --recursive --new-file libstdc.pre/gen/qsort.c libstdc/gen/qsort.c ---- libstdc.pre/gen/qsort.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/qsort.c 2017-01-19 18:01:22.237941075 +1100 -@@ -32,6 +32,7 @@ +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/qsort.c libstdc/gen/qsort.c +--- libstdc.pre/gen/qsort.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/qsort.c 2017-01-19 20:26:24.113068900 +1100 +@@ -32,11 +32,13 @@ * It's not... */ +-qsort(base, n, size, compar) +- char *base; +void - qsort(base, n, size, compar) - char *base; ++qsort(_base, n, size, compar) ++ void *_base; int n; -@@ -106,7 +107,7 @@ + int size; + int (*compar)(); { ++#define base ((char *)_base) + register char c, *i, *j, *lo, *hi; + char *min, *max; + +@@ -89,6 +91,7 @@ + } + } + } ++#undef base + } + + /* +@@ -106,7 +109,7 @@ * (And there are only three places where this is done). */ @@ -684,9 +714,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/qsort.c libstdc/gen/qsort. qst(base, max) char *base, *max; { register char c, *i, *j, *jj; -diff --unified --recursive --new-file libstdc.pre/gen/random.c libstdc/gen/random.c ---- libstdc.pre/gen/random.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/random.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/random.c libstdc/gen/random.c +--- libstdc.pre/gen/random.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/random.c 2017-01-19 20:25:11.484959555 +1100 @@ -222,7 +222,7 @@ if( n < BREAK_1 ) { if( n < BREAK_0 ) { @@ -696,9 +726,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/random.c libstdc/gen/rando } rand_type = TYPE_0; rand_deg = DEG_0; -diff --unified --recursive --new-file libstdc.pre/gen/regex.c libstdc/gen/regex.c ---- libstdc.pre/gen/regex.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/regex.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/regex.c libstdc/gen/regex.c +--- libstdc.pre/gen/regex.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/regex.c 2017-01-19 20:25:11.484959555 +1100 @@ -8,8 +8,6 @@ static char sccsid[] = "@(#)regex.c 5.2 (Berkeley) 3/9/86"; #endif @@ -708,9 +738,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/regex.c libstdc/gen/regex. /* * routines to do regular expression matching * -diff --unified --recursive --new-file libstdc.pre/gen/remque.c libstdc/gen/remque.c ---- libstdc.pre/gen/remque.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/remque.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/remque.c libstdc/gen/remque.c +--- libstdc.pre/gen/remque.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/remque.c 2017-01-19 20:25:11.484959555 +1100 @@ -8,16 +8,19 @@ static char sccsid[] = "@(#)remque.c 5.1 (Berkeley) 1/27/87"; #endif @@ -735,9 +765,25 @@ diff --unified --recursive --new-file libstdc.pre/gen/remque.c libstdc/gen/remqu remque(e) register struct vaxque *e; { -diff --unified --recursive --new-file libstdc.pre/gen/sleep.c libstdc/gen/sleep.c ---- libstdc.pre/gen/sleep.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/sleep.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/signal.c libstdc/gen/signal.c +--- libstdc.pre/gen/signal.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/gen/signal.c 2017-01-19 20:25:11.484959555 +1100 +@@ -13,9 +13,10 @@ + */ + #include + +-int (* ++void (* + signal(s, a))() +- int s, (*a)(); { ++ int s; ++ void (*a)(); { + struct sigvec osv, sv; + static int mask[NSIG]; + static int flags[NSIG]; +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/sleep.c libstdc/gen/sleep.c +--- libstdc.pre/gen/sleep.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/sleep.c 2017-01-19 20:25:11.484959555 +1100 @@ -16,9 +16,11 @@ static int ringring; @@ -761,9 +807,9 @@ diff --unified --recursive --new-file libstdc.pre/gen/sleep.c libstdc/gen/sleep. - ringring = 1; } -diff --unified --recursive --new-file libstdc.pre/gen/syslog.c libstdc/gen/syslog.c ---- libstdc.pre/gen/syslog.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/syslog.c 2017-01-19 18:01:22.237941075 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/syslog.c libstdc/gen/syslog.c +--- libstdc.pre/gen/syslog.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/syslog.c 2017-01-19 20:25:11.484959555 +1100 @@ -54,6 +54,7 @@ extern int errno, sys_nerr; extern char *sys_errlist[]; @@ -790,9 +836,21 @@ diff --unified --recursive --new-file libstdc.pre/gen/syslog.c libstdc/gen/syslo (void) close(LogFile); LogFile = -1; } -diff --unified --recursive --new-file libstdc.pre/gen/usleep.c libstdc/gen/usleep.c ---- libstdc.pre/gen/usleep.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/gen/usleep.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/system.c libstdc/gen/system.c +--- libstdc.pre/gen/system.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/system.c 2017-01-19 20:25:11.484959555 +1100 +@@ -7,7 +7,7 @@ + system(s) + char *s; { + int status, pid, w; +- register int (*istat)(), (*qstat)(); ++ register void (*istat)(), (*qstat)(); + + if ((pid = vfork()) == 0) { + execl("/bin/sh", "sh", "-c", s, 0); +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen/usleep.c libstdc/gen/usleep.c +--- libstdc.pre/gen/usleep.c 2017-01-19 20:25:11.480959550 +1100 ++++ libstdc/gen/usleep.c 2017-01-19 20:25:11.484959555 +1100 @@ -19,9 +19,11 @@ static int ringring; @@ -816,18 +874,18 @@ diff --unified --recursive --new-file libstdc.pre/gen/usleep.c libstdc/gen/uslee - ringring = 1; } -diff --unified --recursive --new-file libstdc.pre/gen.h libstdc/gen.h +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/gen.h libstdc/gen.h --- libstdc.pre/gen.h 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/gen.h 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/gen.h 2017-01-19 20:25:11.484959555 +1100 @@ -0,0 +1,5 @@ +/* formerly duplicated in gen/insque.c and gen/remque.c */ +struct vaxque { /* queue format expected by VAX queue instructions */ + struct vaxque *vq_next; + struct vaxque *vq_prev; +}; -diff --unified --recursive --new-file libstdc.pre/net/named/gethostnamadr.c libstdc/net/named/gethostnamadr.c ---- libstdc.pre/net/named/gethostnamadr.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/named/gethostnamadr.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/named/gethostnamadr.c libstdc/net/named/gethostnamadr.c +--- libstdc.pre/net/named/gethostnamadr.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/named/gethostnamadr.c 2017-01-19 20:25:11.484959555 +1100 @@ -197,6 +197,7 @@ } } @@ -836,9 +894,9 @@ diff --unified --recursive --new-file libstdc.pre/net/named/gethostnamadr.c libs bp += ((u_long)bp % sizeof(align)); if (bp + n >= &hostbuf[sizeof(hostbuf)]) { -diff --unified --recursive --new-file libstdc.pre/net/rcmd.c libstdc/net/rcmd.c ---- libstdc.pre/net/rcmd.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/rcmd.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/rcmd.c libstdc/net/rcmd.c +--- libstdc.pre/net/rcmd.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/rcmd.c 2017-01-19 20:25:11.484959555 +1100 @@ -58,7 +58,7 @@ sin.sin_family = hp->h_addrtype; bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, hp->h_length); @@ -866,9 +924,9 @@ diff --unified --recursive --new-file libstdc.pre/net/rcmd.c libstdc/net/rcmd.c return (s); if (errno != EADDRINUSE) { (void) close(s); -diff --unified --recursive --new-file libstdc.pre/net/res_debug.c libstdc/net/res_debug.c ---- libstdc.pre/net/res_debug.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/res_debug.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/res_debug.c libstdc/net/res_debug.c +--- libstdc.pre/net/res_debug.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/res_debug.c 2017-01-19 20:25:11.484959555 +1100 @@ -324,7 +324,9 @@ } @@ -903,9 +961,9 @@ diff --unified --recursive --new-file libstdc.pre/net/res_debug.c libstdc/net/re + return nbuf; } } -diff --unified --recursive --new-file libstdc.pre/net/res_mkquery.c libstdc/net/res_mkquery.c ---- libstdc.pre/net/res_mkquery.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/res_mkquery.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/res_mkquery.c libstdc/net/res_mkquery.c +--- libstdc.pre/net/res_mkquery.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/res_mkquery.c 2017-01-19 20:25:11.484959555 +1100 @@ -14,7 +14,10 @@ #include #include @@ -929,9 +987,9 @@ diff --unified --recursive --new-file libstdc.pre/net/res_mkquery.c libstdc/net/ } /* * perform opcode specific processing -diff --unified --recursive --new-file libstdc.pre/net/res_send.c libstdc/net/res_send.c ---- libstdc.pre/net/res_send.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/res_send.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/res_send.c libstdc/net/res_send.c +--- libstdc.pre/net/res_send.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/res_send.c 2017-01-19 20:25:11.484959555 +1100 @@ -82,7 +82,7 @@ #endif continue; @@ -950,9 +1008,9 @@ diff --unified --recursive --new-file libstdc.pre/net/res_send.c libstdc/net/res sizeof(struct sockaddr)) < 0 || send(s, buf, buflen, 0) != buflen) { #ifdef DEBUG -diff --unified --recursive --new-file libstdc.pre/net/rexec.c libstdc/net/rexec.c ---- libstdc.pre/net/rexec.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/rexec.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/rexec.c libstdc/net/rexec.c +--- libstdc.pre/net/rexec.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/rexec.c 2017-01-19 20:25:11.484959555 +1100 @@ -49,7 +49,7 @@ sin.sin_family = hp->h_addrtype; sin.sin_port = rport; @@ -971,9 +1029,9 @@ diff --unified --recursive --new-file libstdc.pre/net/rexec.c libstdc/net/rexec. close(s2); if (s3 < 0) { perror("accept"); -diff --unified --recursive --new-file libstdc.pre/net/ruserpass.c libstdc/net/ruserpass.c ---- libstdc.pre/net/ruserpass.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/net/ruserpass.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net/ruserpass.c libstdc/net/ruserpass.c +--- libstdc.pre/net/ruserpass.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/net/ruserpass.c 2017-01-19 20:25:11.484959555 +1100 @@ -19,6 +19,7 @@ struct utmp *getutmp(); static FILE *cfile; @@ -1053,9 +1111,9 @@ diff --unified --recursive --new-file libstdc.pre/net/ruserpass.c libstdc/net/ru mkpwclear(sencpasswd,mch,spasswd) char mch, *spasswd, *sencpasswd; { register char *skey; -diff --unified --recursive --new-file libstdc.pre/net.h libstdc/net.h +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/net.h libstdc/net.h --- libstdc.pre/net.h 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/net.h 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/net.h 2017-01-19 20:25:11.484959555 +1100 @@ -0,0 +1,16 @@ +/* formerly duplicated in netinet/in.h and netns/ns.h */ +/* confuses cproto which thinks #define names are types or type modifiers */ @@ -1073,9 +1131,9 @@ diff --unified --recursive --new-file libstdc.pre/net.h libstdc/net.h +u_short ntohs(), htons(); +u_long ntohl(), htonl(); +/*#endif*/ -diff --unified --recursive --new-file libstdc.pre/netinet/in.h libstdc/netinet/in.h ---- libstdc.pre/netinet/in.h 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/netinet/in.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/netinet/in.h libstdc/netinet/in.h +--- libstdc.pre/netinet/in.h 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/netinet/in.h 2017-01-19 20:25:11.484959555 +1100 @@ -90,20 +90,21 @@ */ #define IP_OPTIONS 1 /* set/get IP per-packet options */ @@ -1108,9 +1166,9 @@ diff --unified --recursive --new-file libstdc.pre/netinet/in.h libstdc/netinet/i #ifdef KERNEL extern struct domain inetdomain; -diff --unified --recursive --new-file libstdc.pre/netinet/ip.h libstdc/netinet/ip.h ---- libstdc.pre/netinet/ip.h 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/netinet/ip.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/netinet/ip.h libstdc/netinet/ip.h +--- libstdc.pre/netinet/ip.h 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/netinet/ip.h 2017-01-19 20:25:11.484959555 +1100 @@ -81,7 +81,7 @@ struct in_addr ipt_addr; n_long ipt_time; @@ -1120,9 +1178,9 @@ diff --unified --recursive --new-file libstdc.pre/netinet/ip.h libstdc/netinet/i }; /* flag bits for ipt_flg */ -diff --unified --recursive --new-file libstdc.pre/netinet/tcp.h libstdc/netinet/tcp.h ---- libstdc.pre/netinet/tcp.h 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/netinet/tcp.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/netinet/tcp.h libstdc/netinet/tcp.h +--- libstdc.pre/netinet/tcp.h 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/netinet/tcp.h 2017-01-19 20:25:11.484959555 +1100 @@ -44,7 +44,9 @@ #ifdef lint #define TCP_MSS 536 @@ -1134,9 +1192,9 @@ diff --unified --recursive --new-file libstdc.pre/netinet/tcp.h libstdc/netinet/ #endif /* -diff --unified --recursive --new-file libstdc.pre/netns/ns.h libstdc/netns/ns.h ---- libstdc.pre/netns/ns.h 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/netns/ns.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/netns/ns.h libstdc/netns/ns.h +--- libstdc.pre/netns/ns.h 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/netns/ns.h 2017-01-19 20:25:11.484959555 +1100 @@ -103,20 +103,21 @@ #define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \ ((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0)) @@ -1169,8 +1227,8 @@ diff --unified --recursive --new-file libstdc.pre/netns/ns.h libstdc/netns/ns.h #ifdef KERNEL extern struct domain nsdomain; -diff --unified --recursive --new-file libstdc.pre/nlist.h libstdc/nlist.h ---- libstdc.pre/nlist.h 2017-01-19 18:01:22.225941066 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/nlist.h libstdc/nlist.h +--- libstdc.pre/nlist.h 2017-01-19 20:25:11.472959537 +1100 +++ libstdc/nlist.h 1970-01-01 10:00:00.000000000 +1000 @@ -1,46 +0,0 @@ -/* @@ -1219,9 +1277,9 @@ diff --unified --recursive --new-file libstdc.pre/nlist.h libstdc/nlist.h - * Format for namelist values. - */ -#define N_FORMAT "%08x" -diff --unified --recursive --new-file libstdc.pre/ns/ns_addr.c libstdc/ns/ns_addr.c ---- libstdc.pre/ns/ns_addr.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/ns/ns_addr.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/ns/ns_addr.c libstdc/ns/ns_addr.c +--- libstdc.pre/ns/ns_addr.c 2017-01-19 20:25:11.468959531 +1100 ++++ libstdc/ns/ns_addr.c 2017-01-19 20:25:11.484959555 +1100 @@ -54,7 +54,7 @@ socketname = index(hostname, separator); if (socketname) { @@ -1240,9 +1298,9 @@ diff --unified --recursive --new-file libstdc.pre/ns/ns_addr.c libstdc/ns/ns_add Field(buf, out, len) char *buf; u_char *out; -diff --unified --recursive --new-file libstdc.pre/stdio/doprnt.c libstdc/stdio/doprnt.c ---- libstdc.pre/stdio/doprnt.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/doprnt.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/doprnt.c libstdc/stdio/doprnt.c +--- libstdc.pre/stdio/doprnt.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/doprnt.c 2017-01-19 20:25:11.484959555 +1100 @@ -271,9 +271,10 @@ * NUL in the first `prec' characters, and * strlen() will go further. @@ -1256,9 +1314,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/doprnt.c libstdc/stdio/d size = p - t; if (size > prec) size = prec; -diff --unified --recursive --new-file libstdc.pre/stdio/doscan.c libstdc/stdio/doscan.c ---- libstdc.pre/stdio/doscan.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/doscan.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/doscan.c libstdc/stdio/doscan.c +--- libstdc.pre/stdio/doscan.c 2017-01-19 20:25:11.468959531 +1100 ++++ libstdc/stdio/doscan.c 2017-01-19 20:25:11.484959555 +1100 @@ -3,7 +3,8 @@ #endif @@ -1338,9 +1396,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/doscan.c libstdc/stdio/d break; } return(1); -diff --unified --recursive --new-file libstdc.pre/stdio/findiop.c libstdc/stdio/findiop.c ---- libstdc.pre/stdio/findiop.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/findiop.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/findiop.c libstdc/stdio/findiop.c +--- libstdc.pre/stdio/findiop.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/findiop.c 2017-01-19 20:25:11.484959555 +1100 @@ -23,7 +23,7 @@ { 0, NULL, NULL, 0, _IOWRT|_IONBF, 2 }, /* stderr */ }; @@ -1379,9 +1437,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/findiop.c libstdc/stdio/ _cleanup() { extern int fclose(); -diff --unified --recursive --new-file libstdc.pre/stdio/fprintf.c libstdc/stdio/fprintf.c ---- libstdc.pre/stdio/fprintf.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/fprintf.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/fprintf.c libstdc/stdio/fprintf.c +--- libstdc.pre/stdio/fprintf.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/fprintf.c 2017-01-19 20:25:11.484959555 +1100 @@ -1,31 +1,48 @@ /* * Copyright (c) 1980 Regents of the University of California. @@ -1441,9 +1499,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/fprintf.c libstdc/stdio/ + va_end(argp); + return(ferror(iop) ? EOF : len); } -diff --unified --recursive --new-file libstdc.pre/stdio/fread.c libstdc/stdio/fread.c ---- libstdc.pre/stdio/fread.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/fread.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/fread.c libstdc/stdio/fread.c +--- libstdc.pre/stdio/fread.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/fread.c 2017-01-19 20:25:11.484959555 +1100 @@ -10,10 +10,11 @@ #include @@ -1464,9 +1522,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/fread.c libstdc/stdio/fr return (size != 0 ? count - ((s + size - 1) / size) : 0); +#undef ptr } -diff --unified --recursive --new-file libstdc.pre/stdio/fwrite.c libstdc/stdio/fwrite.c ---- libstdc.pre/stdio/fwrite.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/fwrite.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/fwrite.c libstdc/stdio/fwrite.c +--- libstdc.pre/stdio/fwrite.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/fwrite.c 2017-01-19 20:25:11.484959555 +1100 @@ -10,10 +10,11 @@ #include @@ -1487,9 +1545,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/fwrite.c libstdc/stdio/f return (size != 0 ? count - ((s + size - 1) / size) : 0); +#undef ptr } -diff --unified --recursive --new-file libstdc.pre/stdio/popen.c libstdc/stdio/popen.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/popen.c libstdc/stdio/popen.c --- libstdc.pre/stdio/popen.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/stdio/popen.c 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/stdio/popen.c 2017-01-19 20:25:11.484959555 +1100 @@ -0,0 +1,77 @@ +/* + * Copyright (c) 1980 Regents of the University of California. @@ -1568,9 +1626,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/popen.c libstdc/stdio/po + (void) sigsetmask(omask); + return (pid == -1 ? -1 : status); +} -diff --unified --recursive --new-file libstdc.pre/stdio/printf.c libstdc/stdio/printf.c ---- libstdc.pre/stdio/printf.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/printf.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/printf.c libstdc/stdio/printf.c +--- libstdc.pre/stdio/printf.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/printf.c 2017-01-19 20:25:11.484959555 +1100 @@ -1,11 +1,35 @@ +/* + * Copyright (c) 1987 Regents of the University of California. @@ -1613,9 +1671,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/printf.c libstdc/stdio/p + va_end(argp); + return(ferror(stdout) ? EOF : len); } -diff --unified --recursive --new-file libstdc.pre/stdio/scanf.c libstdc/stdio/scanf.c ---- libstdc.pre/stdio/scanf.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/scanf.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/scanf.c libstdc/stdio/scanf.c +--- libstdc.pre/stdio/scanf.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/scanf.c 2017-01-19 20:25:11.484959555 +1100 @@ -2,29 +2,50 @@ static char sccsid[] = "@(#)scanf.c 5.2 (Berkeley) 3/9/86"; #endif @@ -1677,9 +1735,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/scanf.c libstdc/stdio/sc + va_end(argp); + return len; } -diff --unified --recursive --new-file libstdc.pre/stdio/setbuffer.c libstdc/stdio/setbuffer.c ---- libstdc.pre/stdio/setbuffer.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/setbuffer.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/setbuffer.c libstdc/stdio/setbuffer.c +--- libstdc.pre/stdio/setbuffer.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/setbuffer.c 2017-01-19 20:25:11.484959555 +1100 @@ -33,11 +33,11 @@ setlinebuf(iop) register FILE *iop; { @@ -1694,9 +1752,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/setbuffer.c libstdc/stdi if (buf != NULL) { setbuffer(iop, buf, BUFSIZ); iop->_flag |= _IOLBF|_IOMYBUF; -diff --unified --recursive --new-file libstdc.pre/stdio/sprintf.c libstdc/stdio/sprintf.c ---- libstdc.pre/stdio/sprintf.c 2017-01-19 18:01:22.225941066 +1100 -+++ libstdc/stdio/sprintf.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/sprintf.c libstdc/stdio/sprintf.c +--- libstdc.pre/stdio/sprintf.c 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio/sprintf.c 2017-01-19 20:25:11.484959555 +1100 @@ -1,17 +1,40 @@ +/* + * Copyright (c) 1987 Regents of the University of California. @@ -1745,9 +1803,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/sprintf.c libstdc/stdio/ + va_end(argp); + return(len); } -diff --unified --recursive --new-file libstdc.pre/stdio/vfprintf.c libstdc/stdio/vfprintf.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/vfprintf.c libstdc/stdio/vfprintf.c --- libstdc.pre/stdio/vfprintf.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/stdio/vfprintf.c 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/stdio/vfprintf.c 2017-01-19 20:25:11.484959555 +1100 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1988 Regents of the University of California. @@ -1795,9 +1853,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/vfprintf.c libstdc/stdio + + return (ferror(iop) ? EOF : len); +} -diff --unified --recursive --new-file libstdc.pre/stdio/vprintf.c libstdc/stdio/vprintf.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/vprintf.c libstdc/stdio/vprintf.c --- libstdc.pre/stdio/vprintf.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/stdio/vprintf.c 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/stdio/vprintf.c 2017-01-19 20:25:11.484959555 +1100 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 1988 Regents of the University of California. @@ -1832,9 +1890,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/vprintf.c libstdc/stdio/ + len = _doprnt(fmt, argp, stdout); + return (ferror(stdout) ? EOF : len); +} -diff --unified --recursive --new-file libstdc.pre/stdio/vsprintf.c libstdc/stdio/vsprintf.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio/vsprintf.c libstdc/stdio/vsprintf.c --- libstdc.pre/stdio/vsprintf.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/stdio/vsprintf.c 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/stdio/vsprintf.c 2017-01-19 20:25:11.484959555 +1100 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1988 Regents of the University of California. @@ -1874,9 +1932,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio/vsprintf.c libstdc/stdio + *f._ptr = 0; + return (len); +} -diff --unified --recursive --new-file libstdc.pre/stdio.h libstdc/stdio.h ---- libstdc.pre/stdio.h 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/stdio.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/stdio.h libstdc/stdio.h +--- libstdc.pre/stdio.h 2017-01-19 20:25:11.472959537 +1100 ++++ libstdc/stdio.h 2017-01-19 20:25:11.484959555 +1100 @@ -59,7 +59,7 @@ long ftell(); char *fgets(); @@ -1886,9 +1944,9 @@ diff --unified --recursive --new-file libstdc.pre/stdio.h libstdc/stdio.h char *sprintf(); /* too painful to do right */ #endif # endif -diff --unified --recursive --new-file libstdc.pre/sys/dir.h libstdc/sys/dir.h ---- libstdc.pre/sys/dir.h 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/sys/dir.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/dir.h libstdc/sys/dir.h +--- libstdc.pre/sys/dir.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/dir.h 2017-01-19 20:25:11.484959555 +1100 @@ -32,9 +32,9 @@ * dp->d_ino set to 0. */ @@ -1902,35 +1960,35 @@ diff --unified --recursive --new-file libstdc.pre/sys/dir.h libstdc/sys/dir.h #define DIRBLKSIZ DEV_BSIZE #define MAXNAMLEN 255 -diff --unified --recursive --new-file libstdc.pre/sys/execl.c libstdc/sys/execl.c ---- libstdc.pre/sys/execl.c 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/sys/execl.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/execl.c libstdc/sys/execl.c +--- libstdc.pre/sys/execl.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/execl.c 2017-01-19 20:25:11.484959555 +1100 @@ -1,3 +1,4 @@ -void execl(f, a) char *f, *a; { +#include +void execl(f, va_alist) char *f; va_dcl { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/execle.c libstdc/sys/execle.c ---- libstdc.pre/sys/execle.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/execle.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/execle.c libstdc/sys/execle.c +--- libstdc.pre/sys/execle.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/execle.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,4 @@ -void execle(f, a) char *f, *a; { +#include +void execle(f, va_alist) char *f; va_dcl { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/ioctl.c libstdc/sys/ioctl.c ---- libstdc.pre/sys/ioctl.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/ioctl.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/ioctl.c libstdc/sys/ioctl.c +--- libstdc.pre/sys/ioctl.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/ioctl.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int ioctl(d, r, p) u_long r; char *p; { +int ioctl(d, r, p) u_long r; void *p; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/isatty.c libstdc/sys/isatty.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/isatty.c libstdc/sys/isatty.c --- libstdc.pre/sys/isatty.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/sys/isatty.c 2017-01-19 18:01:22.241941078 +1100 ++++ libstdc/sys/isatty.c 2017-01-19 20:25:11.488959561 +1100 @@ -0,0 +1,17 @@ +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)isatty.c 5.2 (Berkeley) 3/9/86"; @@ -1949,18 +2007,18 @@ diff --unified --recursive --new-file libstdc.pre/sys/isatty.c libstdc/sys/isatt + return(0); + return(1); +} -diff --unified --recursive --new-file libstdc.pre/sys/open.c libstdc/sys/open.c ---- libstdc.pre/sys/open.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/open.c 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/open.c libstdc/sys/open.c +--- libstdc.pre/sys/open.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/open.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,4 @@ -int open(f, m, stuff) char *f; { +#include +int open(f, m, va_alist) char *f; va_dcl { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/param.h libstdc/sys/param.h ---- libstdc.pre/sys/param.h 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/param.h 2017-01-19 18:01:22.241941078 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/param.h libstdc/sys/param.h +--- libstdc.pre/sys/param.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/param.h 2017-01-19 20:25:11.488959561 +1100 @@ -53,15 +53,16 @@ /* * Signals @@ -2006,9 +2064,9 @@ diff --unified --recursive --new-file libstdc.pre/sys/param.h libstdc/sys/param. + +/* moved this from sys/types.h */ +#define NBBY 8 /* number of bits in a byte */ -diff --unified --recursive --new-file libstdc.pre/sys/proc.h libstdc/sys/proc.h ---- libstdc.pre/sys/proc.h 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/proc.h 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/proc.h libstdc/sys/proc.h +--- libstdc.pre/sys/proc.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/proc.h 2017-01-19 20:25:11.488959561 +1100 @@ -117,3 +117,8 @@ #define SSEL 0x0400000 /* selecting; wakeup/waiting danger */ #define SLOGIN 0x0800000 /* a login process (legit child of init) */ @@ -2018,33 +2076,33 @@ diff --unified --recursive --new-file libstdc.pre/sys/proc.h libstdc/sys/proc.h +#define ISSIG(p) \ + ((p)->p_sig && ((p)->p_flag&STRC || \ + ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig()) -diff --unified --recursive --new-file libstdc.pre/sys/read.c libstdc/sys/read.c ---- libstdc.pre/sys/read.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/read.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/read.c libstdc/sys/read.c +--- libstdc.pre/sys/read.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/read.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int read(f, b, l) char *b; { +int read(f, b, l) void *b; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/recv.c libstdc/sys/recv.c ---- libstdc.pre/sys/recv.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/recv.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/recv.c libstdc/sys/recv.c +--- libstdc.pre/sys/recv.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/recv.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int recv(s, b, l, f) char *b; { +int recv(s, b, l, f) void *b; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/recvfrom.c libstdc/sys/recvfrom.c ---- libstdc.pre/sys/recvfrom.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/recvfrom.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/recvfrom.c libstdc/sys/recvfrom.c +--- libstdc.pre/sys/recvfrom.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/recvfrom.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int recvfrom(s, b, l, f, fr, fl) char *b; struct sockaddr *fr; int *fl; { +int recvfrom(s, b, l, f, fr, fl) void *b; struct sockaddr *fr; int *fl; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/select.h libstdc/sys/select.h +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/select.h libstdc/sys/select.h --- libstdc.pre/sys/select.h 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/sys/select.h 2017-01-19 18:01:22.245941081 +1100 ++++ libstdc/sys/select.h 2017-01-19 20:25:11.488959561 +1100 @@ -0,0 +1,28 @@ +#include + @@ -2074,25 +2132,64 @@ diff --unified --recursive --new-file libstdc.pre/sys/select.h libstdc/sys/selec +#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) +#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) +#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) -diff --unified --recursive --new-file libstdc.pre/sys/send.c libstdc/sys/send.c ---- libstdc.pre/sys/send.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/send.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/send.c libstdc/sys/send.c +--- libstdc.pre/sys/send.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/send.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int send(s, m, l, f) char *m; { +int send(s, m, l, f) void *m; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/sendto.c libstdc/sys/sendto.c ---- libstdc.pre/sys/sendto.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/sendto.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/sendto.c libstdc/sys/sendto.c +--- libstdc.pre/sys/sendto.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/sendto.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int sendto(s, m, l, f, t, tl) char *m; struct sockaddr *t; { +int sendto(s, m, l, f, t, tl) void *m; struct sockaddr *t; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/tty.h libstdc/sys/tty.h ---- libstdc.pre/sys/tty.h 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/tty.h 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/signal.h libstdc/sys/signal.h +--- libstdc.pre/sys/signal.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/signal.h 2017-01-19 20:25:11.488959561 +1100 +@@ -57,14 +57,14 @@ + #define SIGUSR2 31 /* user defined signal 2 */ + + #ifndef KERNEL +-int (*signal())(); ++void (*signal())(); + #endif + + /* + * Signal vector "template" used in sigvec call. + */ + struct sigvec { +- int (*sv_handler)(); /* signal handler */ ++ void (*sv_handler)(); /* signal handler */ + int sv_mask; /* signal mask to apply */ + int sv_flags; /* see signal options below */ + }; +@@ -97,13 +97,13 @@ + int sc_ps; /* psl to restore */ + }; + +-#define BADSIG (int (*)())-1 +-#define SIG_DFL (int (*)())0 +-#define SIG_IGN (int (*)())1 ++#define BADSIG (void (*)())-1 ++#define SIG_DFL (void (*)())0 ++#define SIG_IGN (void (*)())1 + + #ifdef KERNEL +-#define SIG_CATCH (int (*)())2 +-#define SIG_HOLD (int (*)())3 ++#define SIG_CATCH (void (*)())2 ++#define SIG_HOLD (void (*)())3 + #endif + #endif + +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/tty.h libstdc/sys/tty.h +--- libstdc.pre/sys/tty.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/tty.h 2017-01-19 20:25:11.488959561 +1100 @@ -70,20 +70,22 @@ struct ttychars t_chars; /* tty */ struct winsize t_winsize; /* window size */ @@ -2130,9 +2227,9 @@ diff --unified --recursive --new-file libstdc.pre/sys/tty.h libstdc/sys/tty.h }; #define TTIPRI 28 -diff --unified --recursive --new-file libstdc.pre/sys/types.h libstdc/sys/types.h ---- libstdc.pre/sys/types.h 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/types.h 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/types.h libstdc/sys/types.h +--- libstdc.pre/sys/types.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/types.h 2017-01-19 20:25:11.488959561 +1100 @@ -45,30 +45,32 @@ typedef u_short uid_t; typedef u_short gid_t; @@ -2182,16 +2279,16 @@ diff --unified --recursive --new-file libstdc.pre/sys/types.h libstdc/sys/types. +/*#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))*/ #endif -diff --unified --recursive --new-file libstdc.pre/sys/vfork.c libstdc/sys/vfork.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/vfork.c libstdc/sys/vfork.c --- libstdc.pre/sys/vfork.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/sys/vfork.c 2017-01-19 18:01:22.245941081 +1100 ++++ libstdc/sys/vfork.c 2017-01-19 20:25:11.488959561 +1100 @@ -0,0 +1,3 @@ +int vfork() { + abort(); +} -diff --unified --recursive --new-file libstdc.pre/sys/vmmac.h libstdc/sys/vmmac.h ---- libstdc.pre/sys/vmmac.h 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/vmmac.h 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/vmmac.h libstdc/sys/vmmac.h +--- libstdc.pre/sys/vmmac.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/vmmac.h 2017-01-19 20:25:11.488959561 +1100 @@ -157,3 +157,10 @@ } \ c->c_lock = 0; \ @@ -2203,33 +2300,33 @@ diff --unified --recursive --new-file libstdc.pre/sys/vmmac.h libstdc/sys/vmmac. +/* moved this from sys/vmmac.h to avoid a circular dependency */ +#define mapin(pte, v, pfnum, count, prot) \ + (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v))) -diff --unified --recursive --new-file libstdc.pre/sys/vopen.c libstdc/sys/vopen.c +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/vopen.c libstdc/sys/vopen.c --- libstdc.pre/sys/vopen.c 1970-01-01 10:00:00.000000000 +1000 -+++ libstdc/sys/vopen.c 2017-01-19 18:01:22.245941081 +1100 ++++ libstdc/sys/vopen.c 2017-01-19 20:25:11.488959561 +1100 @@ -0,0 +1,4 @@ +#include +int vopen(f, m, argp) char *f; va_list argp; { + abort(); +} -diff --unified --recursive --new-file libstdc.pre/sys/wait.c libstdc/sys/wait.c ---- libstdc.pre/sys/wait.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/wait.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/wait.c libstdc/sys/wait.c +--- libstdc.pre/sys/wait.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/wait.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int wait(s) union wait *s; { +int wait(s) int *s; { abort(); } -diff --unified --recursive --new-file libstdc.pre/sys/write.c libstdc/sys/write.c ---- libstdc.pre/sys/write.c 2017-01-19 18:01:22.229941069 +1100 -+++ libstdc/sys/write.c 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/sys/write.c libstdc/sys/write.c +--- libstdc.pre/sys/write.c 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/sys/write.c 2017-01-19 20:25:11.488959561 +1100 @@ -1,3 +1,3 @@ -int write(f, b, l) char *b; { +int write(f, b, l) void *b; { abort(); } -diff --unified --recursive --new-file libstdc.pre/vax/vmparam.h libstdc/vax/vmparam.h ---- libstdc.pre/vax/vmparam.h 2017-01-19 18:01:22.233941072 +1100 -+++ libstdc/vax/vmparam.h 2017-01-19 18:01:22.245941081 +1100 +diff --unified --recursive --new-file '--exclude=*.o' '--exclude=x' libstdc.pre/vax/vmparam.h libstdc/vax/vmparam.h +--- libstdc.pre/vax/vmparam.h 2017-01-19 20:25:11.476959544 +1100 ++++ libstdc/vax/vmparam.h 2017-01-19 20:25:11.488959561 +1100 @@ -156,5 +156,6 @@ /* * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1 diff --git a/lib/libstdc/sys/dir.h b/lib/libstdc/sys/dir.h index 2b9bc6d..536e055 100644 --- a/lib/libstdc/sys/dir.h +++ b/lib/libstdc/sys/dir.h @@ -122,7 +122,7 @@ DIR *opendir __P((char *name)); struct direct *readdir __P((register DIR *dirp)); /* gen/scandir.c */ -int scandir __P((char *dirname, struct direct *(*namelist[]), int (*select)(void), int (*dcomp)(void))); +int scandir __P((char *dirname, struct direct *(*namelist[]), int (*select)(struct direct *d), int (*dcomp)(struct direct *d0, struct direct *d1))); int alphasort __P((struct direct **d1, struct direct **d2)); /* gen/seekdir.c */ diff --git a/x_include/sys/x_dir.h b/x_include/sys/x_dir.h index e66a474..e00b2b8 100644 --- a/x_include/sys/x_dir.h +++ b/x_include/sys/x_dir.h @@ -124,7 +124,7 @@ x_DIR *x_opendir __P((char *x_name)); struct x_direct *x_readdir __P((register x_DIR *x_dirp)); /* gen/scandir.c */ -x_int x_scandir __P((char *x_dirname, struct x_direct *(*x_namelist[]), x_int (*x_select)(void), x_int (*x_dcomp)(void))); +x_int x_scandir __P((char *x_dirname, struct x_direct *(*x_namelist[]), x_int (*x_select)(struct x_direct *x_d), x_int (*x_dcomp)(struct x_direct *x_d0, struct x_direct *x_d1))); x_int x_alphasort __P((struct x_direct **x_d1, struct x_direct **x_d2)); /* gen/seekdir.c */ diff --git a/x_include/x_gen.h b/x_include/x_gen.h index b5433a6..264cec9 100644 --- a/x_include/x_gen.h +++ b/x_include/x_gen.h @@ -110,7 +110,7 @@ x_int x_mkstemp __P((char *x_as)); char *x_mktemp __P((char *x_as)); /* gen/qsort.c */ -void x_qsort __P((char *x_base, x_int x_n, x_int x_size, x_int (*x_compar)(void))); +void x_qsort __P((void *x__base, x_int x_n, x_int x_size, x_int (*x_compar)(void *x_p0, void *x_p1))); /* gen/random.c */ x_int x_srandom __P((x_unsigned_int x_x));