cproto-4.6/lex.yy.c
cproto-4.6/stamp-h
cproto-4.6/y.tab.c
+lib/libstdc.pre
+lib/libstdc.post
lib/libstdc/*.temp
lib/libstdc/xx*
-lib/libstdc.orig
+lib/libstdc/pre.patch.bak
+lib/libstdc/post.patch.bak
xify/newline
xify/nocomment
xify/nostring
:4; /* nothing, yet */
};
-#include <nlist.h>
+/*
+ * Format of a symbol table entry; this file is included by <a.out.h>
+ * and should be used if you aren't interested the a.out header
+ * or relocation information.
+ */
+struct nlist {
+ union {
+ char *n_name; /* for use when in-core */
+ long n_strx; /* index into file string table */
+ } n_un;
+unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
+ char n_other; /* unused */
+ short n_desc; /* see <stab.h> */
+unsigned long n_value; /* value of this symbol (or sdb offset) */
+};
+#define n_hash n_desc /* used internally by ld */
+
+/*
+ * Simple values for n_type.
+ */
+#define N_UNDF 0x0 /* undefined */
+#define N_ABS 0x2 /* absolute */
+#define N_TEXT 0x4 /* text */
+#define N_DATA 0x6 /* data */
+#define N_BSS 0x8 /* bss */
+#define N_COMM 0x12 /* common (internal to ld) */
+#define N_FN 0x1f /* file name symbol */
+
+#define N_EXT 01 /* external bit, or'ed in */
+#define N_TYPE 0x1e /* mask for all the type bits */
+
+/*
+ * Sdb entries have some of the N_STAB bits set.
+ * These are given in <stab.h>
+ */
+#define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
+
+/*
+ * Format for namelist values.
+ */
+#define N_FORMAT "%08x"
#endif
/*#include <sys/time.h>*/
/*#include <sys/resource.h>*/
+/*#include <sys/times.h>*/
/*
* Backwards compatible times.
*/
-struct tms {
- int tms_utime; /* user time */
- int tms_stime; /* system time */
- int tms_cutime; /* user time, children */
- int tms_cstime; /* system time, children */
-};
+/* we now get this from sys/times.h to avoid duplication */
+/*struct tms {*/
+/* int tms_utime;*/ /* user time */
+/* int tms_stime;*/ /* system time */
+/* int tms_cutime;*/ /* user time, children */
+/* int tms_cstime;*/ /* system time, children */
+/*};*/
static scale60 __P((register struct timeval *tvp));
static char sccsid[] = "@(#)memccpy.c 5.2 (Berkeley) 86/03/09";
#endif
-char *memccpy(t, f, c, n) register char *t; register char *f; register c; register n; {
+char *memccpy(_t, _f, c, n) void *_t; void *_f; register c; register n; {
+#define t (*(char **)&_t)
+#define f (*(char **)&_f)
while (--n >= 0)
if ((*t++ = *f++) == c)
return (t);
return (0);
+#undef t
+#undef f
}
static char sccsid[] = "@(#)memchr.c 5.2 (Berkeley) 86/03/09";
#endif
-char *memchr(s, c, n) register char *s; register c; register n; {
+void *memchr(_s, c, n) void *_s; register c; register n; {
+#define s (*(char **)&_s)
while (--n >= 0)
if (*s++ == c)
return (--s);
return (0);
+#undef s
}
static char sccsid[] = "@(#)memcmp.c 5.2 (Berkeley) 86/03/09";
#endif
-int memcmp(s1, s2, n) register char *s1; register char *s2; register n; {
+int memcmp(_s1, _s2, n) void *_s1; void *_s2; register n; {
+#define s1 (*(char **)&_s1)
+#define s2 (*(char **)&_s2)
while (--n >= 0)
if (*s1++ != *s2++)
return (*--s1 - *--s2);
return (0);
+#undef s1
+#undef s2
}
static char sccsid[] = "@(#)memcpy.c 5.2 (Berkeley) 86/03/09";
#endif
-char *memcpy(t, f, n) register char *t; register char *f; register n; {
+void *memcpy(_t, _f, n) void *_t; void *_f; register n; {
+#define t (*(char **)&_t)
+#define f (*(char **)&_f)
register char *p = t;
while (--n >= 0)
*t++ = *f++;
return (p);
+#undef t
+#undef f
}
static char sccsid[] = "@(#)memset.c 5.2 (Berkeley) 86/03/09";
#endif
-char *memset(s, c, n) register char *s; register c; register n; {
+void *memset(_s, c, n) void *_s; register c; register n; {
+#define s (*(char **)&_s)
register char *p = s;
while (--n >= 0)
*s++ = c;
return (p);
+#undef s
}
long atol __P((register char *p));
/* gen/bcmp.c */
-int bcmp __P((register char *b1, register char *b2, register int length));
+int bcmp __P((void *_b1, void *_b2, register int length));
/* gen/bcopy.c */
-int bcopy __P((register char *src, register char *dst, register int length));
+int bcopy __P((void *_src, void *_dst, register int length));
/* gen/bzero.c */
-int bzero __P((register char *b, register int length));
+int bzero __P((void *_b, register int length));
/* gen/calloc.c */
-char *calloc __P((register unsigned num, register unsigned size));
-int cfree __P((char *p, unsigned num, unsigned size));
+void *calloc __P((register unsigned num, register unsigned size));
+int cfree __P((void *p, unsigned num, unsigned size));
/* gen/crypt.c */
int setkey __P((char *key));
int insque __P((register struct vaxque *e, register struct vaxque *prev));
/* gen/malloc.c */
-char *malloc __P((unsigned nbytes));
+void *malloc __P((unsigned nbytes));
void morecore __P((int bucket));
-void free __P((char *cp));
-char *realloc __P((char *cp, unsigned nbytes));
+void free __P((void *cp));
+void *realloc __P((void *cp, unsigned nbytes));
void mstats __P((char *s));
/* gen/mkstemp.c */
/*
* bcmp -- vax cmpc3 instruction
*/
-int bcmp(b1, b2, length) register char *b1; register char *b2; register int length; {
-
+int bcmp(_b1, _b2, length) void *_b1; void *_b2; register int length; {
+#define b1 (*(char **)&_b1)
+#define b2 (*(char **)&_b2)
if (length == 0)
return (0);
do
break;
while (--length);
return(length);
+#undef b1
+#undef b2
}
/*
* bcopy -- vax movc3 instruction
*/
-int bcopy(src, dst, length) register char *src; register char *dst; register int length; {
+int bcopy(_src, _dst, length) void *_src; void *_dst; register int length; {
+#define src (*(char **)&_src)
+#define dst (*(char **)&_dst)
if (length && src != dst)
if ((u_int)dst < (u_int)src)
if (((int)src | (int)dst | length) & 3)
else {
length >>= 2;
do /* copy by longs */
- *((long *)dst)++ = *((long *)src)++;
+ *(*(long **)&dst)++ = *(*(long **)&src)++;
while (--length);
}
else { /* copy backwards */
else {
length >>= 2;
do /* copy by shorts */
- *--((long *)dst) = *--((long *)src);
+ *--(*(long **)&dst) = *--(*(long **)&src);
while (--length);
}
}
return(0);
+#undef src
+#undef dst
}
/*
* bzero -- vax movc5 instruction
*/
-int bzero(b, length) register char *b; register int length; {
-
+int bzero(_b, length) void *_b; register int length; {
+#define b (*(char **)&_b)
if (length)
do
*b++ = '\0';
while (--length);
return(length);
+#undef b
}
/*
* Calloc - allocate and clear memory block
*/
-char *calloc(num, size) register unsigned num; register unsigned size; {
- extern char *malloc();
- register char *p;
+void *calloc(num, size) register unsigned num; register unsigned size; {
+ extern void *malloc();
+ register void *p;
size *= num;
if (p = malloc(size))
return (p);
}
-int cfree(p, num, size) char *p; unsigned num; unsigned size; {
+int cfree(p, num, size) void *p; unsigned num; unsigned size; {
free(p);
}
register c;
FILE *fi;
static char pbuf[9];
- int (*signal())();
- int (*sig)();
+ void (*signal())();
+ void (*sig) __P((int sig));
if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
fi = stdin;
cp = key.dptr;
tp = line;
+#ifdef __STDC__
+#define EXPAND(e) passwd.pw_ ## e = tp; while (*tp++ = *cp++);
+#else
#define EXPAND(e) passwd.pw_/**/e = tp; while (*tp++ = *cp++);
+#endif
+#ifdef X_
+/* without this adjustment it tries to access x_passwd.x_pw_x_name etc */
+ EXPAND(nox_name);
+ EXPAND(nox_passwd);
+#else
EXPAND(name);
EXPAND(passwd);
+#endif
bcopy(cp, (char *)&passwd.pw_uid, sizeof (int));
cp += sizeof (int);
bcopy(cp, (char *)&passwd.pw_gid, sizeof (int));
cp += sizeof (int);
bcopy(cp, (char *)&passwd.pw_quota, sizeof (int));
cp += sizeof (int);
+#ifdef X_
+/* without this adjustment it tries to access x_passwd.x_pw_x_name etc */
+ EXPAND(nox_comment);
+ EXPAND(nox_gecos);
+ EXPAND(nox_dir);
+ EXPAND(nox_shell);
+#else
EXPAND(comment);
EXPAND(gecos);
EXPAND(dir);
EXPAND(shell);
+#endif
return (&passwd);
}
register char **sp, *cp;
register FILE *fp;
struct stat statb;
- extern char *malloc(), *calloc();
+ extern void *malloc(), *calloc();
if (shells != NULL)
free((char *)shells);
(void)fclose(fp);
return(okshells);
}
- if ((strings = malloc((unsigned)statb.st_size)) == NULL) {
+ if ((strings = (char *)malloc((unsigned)statb.st_size)) == NULL) {
(void)fclose(fp);
return(okshells);
}
#if defined(DEBUG) || defined(RCHECK)
#define ASSERT(p) if (!(p)) botch("p")
/*#include <stdio.h>*/
-static void botch __P((char *s));
-static findbucket __P((union overhead *freep, int srchlen));
-
static void botch(s) char *s; {
fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
(void) fflush(stderr); /* just in case user buffered it */
#define ASSERT(p)
#endif
-char *malloc(nbytes) unsigned nbytes; {
+static findbucket __P((union overhead *freep, int srchlen));
+
+void *malloc(nbytes) unsigned nbytes; {
register union overhead *op;
register int bucket;
register unsigned amt, n;
}
}
-void free(cp) char *cp; {
+void free(cp) void *cp; {
register int size;
register union overhead *op;
*/
int realloc_srchlen = 4; /* 4 should be plenty, -1 =>'s whole list */
-char *realloc(cp, nbytes) char *cp; unsigned nbytes; {
+void *realloc(cp, nbytes) void *cp; unsigned nbytes; {
register u_int onb, i;
union overhead *op;
char *res;
#include <sys/file.h>
#include <sys/param.h>
#include <sys/stat.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#define _va_start(argp, arg) va_start(argp, arg)
+#else
+#include <varargs.h>
+#define _va_start(argp, arg) va_start(argp)
+#endif
/*
* Copyright (c) 1983 Regents of the University of California.
/*#include <stdio.h>*/
/*#include <errno.h>*/
/*#include <ndbm.h>*/
+/*#include <varargs.h>*/
#define BYTESIZ 8
#undef setbit
/*static long dcalchash();*/
extern int errno;
+#ifdef __STDC__
static dbm_access __P((register DBM *db, long hash));
static getbit __P((register DBM *db));
static setbit __P((register DBM *db));
static additem __P((char buf[PBLKSIZ], datum item, datum item1));
static chkblk __P((char buf[PBLKSIZ]));
-DBM *dbm_open(file, flags, mode) char *file; int flags; int mode; {
+DBM *dbm_open(char *file, int flags, ...)
+#else
+DBM *dbm_open(file, flags, va_alist) char *file; int flags; va_dcl
+#endif
+{
+ va_list argp;
struct stat statb;
register DBM *db;
flags = (flags & ~03) | O_RDWR;
strcpy(db->dbm_pagbuf, file);
strcat(db->dbm_pagbuf, ".pag");
- db->dbm_pagf = open(db->dbm_pagbuf, flags, mode);
+ _va_start(argp, flags);
+ db->dbm_pagf = vopen(db->dbm_pagbuf, flags, argp);
+ va_end(argp);
if (db->dbm_pagf < 0)
goto bad;
strcpy(db->dbm_pagbuf, file);
strcat(db->dbm_pagbuf, ".dir");
- db->dbm_dirf = open(db->dbm_pagbuf, flags, mode);
+ _va_start(argp, flags);
+ db->dbm_dirf = vopen(db->dbm_pagbuf, flags, argp);
+ va_end(argp);
if (db->dbm_dirf < 0)
goto bad1;
fstat(db->dbm_dirf, &statb);
#include <a.out.h>
-#include <nlist.h>
#include <stdio.h>
#include <strings.h>
#include <sys/exec.h>
int errno;
int sys_nerr;
-char *sys_errlist[];
+extern char *sys_errlist[];
int perror(s) char *s; {
struct iovec iov[4];
register struct iovec *v = iov;
*/
/*#include <signal.h>*/
-int (*signal(s, a))() int s; int (*a)(); {
+void (*signal(s, a)) __P((int sig)) int s; void (*a) __P((int sig)); {
struct sigvec osv, sv;
static int mask[NSIG];
static int flags[NSIG];
- sv.sv_handler = a;
+ sv.sv_handler = (void (*) __P((int sig, int code, struct sigcontext *scp)))a;
sv.sv_mask = mask[s];
sv.sv_flags = flags[s];
if (sigvec(s, &sv, &osv) < 0)
if (sigvec(s, &sv, 0) < 0)
return (BADSIG);
}
- return (osv.sv_handler);
+ return ((void (*) __P((int sig)))osv.sv_handler);
}
/*#include <signal.h>*/
#define setvec(vec, a) \
- vec.sv_handler = a; vec.sv_mask = vec.sv_onstack = 0
+ vec.sv_handler = (void (*) __P((int sig, int code, struct sigcontext *scp)))a; vec.sv_mask = vec.sv_onstack = 0
static int ringring;
static void sleepx __P((void));
void sleep(n) unsigned n; {
- int sleepx(), omask;
+ void sleepx();
+ int omask;
struct itimerval itv, oitv;
register struct itimerval *itp = &itv;
struct sigvec vec, ovec;
int system(s) char *s; {
int status, pid, w;
- register int (*istat)(), (*qstat)();
+ register void (*istat) __P((int sig)), (*qstat) __P((int sig));
if ((pid = vfork()) == 0) {
execl("/bin/sh", "sh", "-c", s, 0);
#define TICK 10000 /* system clock resolution in microseconds */
#define setvec(vec, a) \
- vec.sv_handler = a; vec.sv_mask = vec.sv_onstack = 0
+ vec.sv_handler = (void (*) __P((int sig, int code, struct sigcontext *scp)))a; vec.sv_mask = vec.sv_onstack = 0
static int ringring;
static void sleepx __P((void));
void usleep(n) unsigned n; {
- int sleepx(), omask;
+ void sleepx();
+ int omask;
struct itimerval itv, oitv;
register struct itimerval *itp = &itv;
struct sigvec vec, ovec;
sys/utimes.c sys/time.h
sys/vfork.c sys/proc.h
sys/vhangup.c
+sys/vopen.c sys/file.h
sys/wait3.c sys/wait.h
sys/wait.c sys/wait.h
sys/write.c sys/file.h
#endif
/* compat-sys5/memccpy.c */
-char *memccpy __P((register char *t, register char *f, register c, register n));
+char *memccpy __P((void *_t, void *_f, register c, register n));
/* compat-sys5/memchr.c */
-char *memchr __P((register char *s, register c, register n));
+void *memchr __P((void *_s, register c, register n));
/* compat-sys5/memcmp.c */
-int memcmp __P((register char *s1, register char *s2, register n));
+int memcmp __P((void *_s1, void *_s2, register n));
/* compat-sys5/memcpy.c */
-char *memcpy __P((register char *t, register char *f, register n));
+void *memcpy __P((void *_t, void *_f, register n));
/* compat-sys5/memset.c */
-char *memset __P((register char *s, register c, register n));
+void *memset __P((void *_s, register c, register n));
#endif
#endif
+++ /dev/null
-#!/bin/sh
-(cd ..; diff --unified --recursive --new-file libstdc.orig libstdc) >a
-mv libstdc.patch libstdc.patch.bak
-mv a libstdc.patch
-wc -l libstdc.patch libstdc.patch.bak
--- /dev/null
+#!/bin/sh
+rm -f ../libstdc.post/post.patch ../libstdc.post/post.patch.bak post.patch.bak
+mv post.patch ../post.patch.bak
+(cd ..; diff --unified --recursive --new-file --exclude=*.o --exclude=x libstdc.post libstdc >post.patch)
+mv ../post.patch.bak ../post.patch .
+wc -l post.patch post.patch.bak
--- /dev/null
+#!/bin/sh
+rm -f ../libstdc.pre/pre.patch ../libstdc.pre/pre.patch.bak pre.patch.bak
+mv pre.patch ../pre.patch.bak
+(cd ..; diff --unified --recursive --new-file --exclude=*.o --exclude=x libstdc.pre libstdc >pre.patch)
+mv ../pre.patch.bak ../pre.patch .
+wc -l pre.patch pre.patch.bak
fi
fi
done
-sed -e 's/fork/vfork/g' <sys/fork.c >sys/vfork.c
find vax -name Makefile -print |\
while read i
cat xx* >$i
done
-rm -rf ../libstdc.orig
-cp -r ../libstdc ../libstdc.orig
-patch --strip 1 <libstdc.patch
+rm -rf ../libstdc.pre
+cp -r ../libstdc ../libstdc.pre
+patch --strip 1 <pre.patch
#endif
/* gen/ndbm.c */
-DBM *dbm_open __P((char *file, int flags, int mode));
+DBM *dbm_open __P((char *file, int flags, ...));
void dbm_close __P((DBM *db));
long dbm_forder __P((register DBM *db, datum key));
datum dbm_fetch __P((register DBM *db, datum key));
}
}
+/* XXX should be: bp = (bp + sizeof(align) - 1) & ~sizeof(align) ??? */
bp += ((u_long)bp % sizeof(align));
if (bp + n >= &hostbuf[sizeof(hostbuf)]) {
sin.sin_family = hp->h_addrtype;
bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, hp->h_length);
sin.sin_port = rport;
- if (connect(s, (caddr_t)&sin, sizeof (sin), 0) >= 0)
+ if (connect(s, (struct sockaddr *)&sin, sizeof (sin)/*, 0*/) >= 0)
break;
(void) close(s);
if (errno == EADDRINUSE) {
(void) close(s2);
goto bad;
}
- s3 = accept(s2, &from, &len, 0);
+ s3 = accept(s2, (struct sockaddr *)&from, &len/*, 0*/);
(void) close(s2);
if (s3 < 0) {
perror("accept");
return (-1);
for (;;) {
sin.sin_port = htons((u_short)*alport);
- if (bind(s, (caddr_t)&sin, sizeof (sin)) >= 0)
+ if (bind(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0)
return (s);
if (errno != EADDRINUSE) {
(void) close(s);
}
static char nbuf[20];
+/* we have taken the portable sprintf() from 4.3tahoe */
/*extern char *sprintf();*/
+/*extern int sprintf();*/
/*
* Return a string for the type
case T_GID:
return("GID");
default:
- return (sprintf(nbuf, "%d", type));
+/* we have taken the portable sprintf() from 4.3tahoe */
+ /*return (sprintf(nbuf, "%d", type));*/
+ sprintf(nbuf, "%d", type);
+ return nbuf;
}
}
case C_ANY: /* matches any class */
return("ANY");
default:
- return (sprintf(nbuf, "%d", class));
+/* we have taken the portable sprintf() from 4.3tahoe */
+ /*return (sprintf(nbuf, "%d", class));*/
+ sprintf(nbuf, "%d", class);
+ return nbuf;
}
}
/*#include <arpa/nameser.h>*/
/*#include <resolv.h>*/
+/* we have taken the portable sprintf() from 4.3tahoe */
/*extern char *sprintf();*/
+/*extern int sprintf();*/
/*
* Form all types of queries.
if (res_init() == -1)
return(-1);
if (_res.defdname[0] != '\0')
- dname = sprintf(dnbuf, "%s.%s", dname, _res.defdname);
+/* we have taken the portable sprintf() from 4.3tahoe */
+ /*dname = sprintf(dnbuf, "%s.%s", dname, _res.defdname);*/
+ sprintf(dname = dnbuf, "%s.%s", dname, _res.defdname);
}
/*
* perform opcode specific processing
#endif
continue;
}
- if (connect(s, &(_res.nsaddr_list[ns]),
+ if (connect(s, (struct sockaddr *)&(_res.nsaddr_list[ns]),
sizeof(struct sockaddr)) < 0) {
terrno = errno;
#ifdef DEBUG
if (s < 0)
s = socket(AF_INET, SOCK_DGRAM, 0);
#if BSD >= 43
- if (connect(s, &_res.nsaddr_list[ns],
+ if (connect(s, (struct sockaddr *)&_res.nsaddr_list[ns],
sizeof(struct sockaddr)) < 0 ||
send(s, buf, buflen, 0) != buflen) {
#ifdef DEBUG
sin.sin_family = hp->h_addrtype;
sin.sin_port = rport;
bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
- if (connect(s, &sin, sizeof(sin)) < 0) {
+ if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
if (errno == ECONNREFUSED && timo <= 16) {
(void) close(s);
sleep(timo);
(void) sprintf(num, "%d", port);
(void) write(s, num, strlen(num)+1);
{ int len = sizeof (from);
- s3 = accept(s2, &from, &len, 0);
+ s3 = accept(s2, (struct sockaddr *)&from, &len/*, 0*/);
close(s2);
if (s3 < 0) {
perror("accept");
+++ /dev/null
-#ifndef _NLIST_H_
-#define _NLIST_H_
-
-/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- *
- * @(#)nlist.h 5.1 (Berkeley) 5/30/85
- */
-
-/*
- * Format of a symbol table entry; this file is included by <a.out.h>
- * and should be used if you aren't interested the a.out header
- * or relocation information.
- */
-struct nlist {
- char *n_name; /* for use when in-core */
- unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
- char n_other; /* unused */
- short n_desc; /* see <stab.h> */
- unsigned long n_value; /* value of this symbol (or sdb offset) */
-};
-#define n_hash n_desc /* used internally by ld */
-
-/*
- * Simple values for n_type.
- */
-#define N_UNDF 0x0 /* undefined */
-#define N_ABS 0x2 /* absolute */
-#define N_TEXT 0x4 /* text */
-#define N_DATA 0x6 /* data */
-#define N_BSS 0x8 /* bss */
-#define N_COMM 0x12 /* common (internal to ld) */
-#define N_FN 0x1f /* file name symbol */
-
-#define N_EXT 01 /* external bit, or'ed in */
-#define N_TYPE 0x1e /* mask for all the type bits */
-
-/*
- * Sdb entries have some of the N_STAB bits set.
- * These are given in <stab.h>
- */
-#define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
-
-/*
- * Format for namelist values.
- */
-#define N_FORMAT "%08x"
-
-#ifndef KERNEL
-#ifndef __P
-#ifdef __STDC__
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif
-#endif
-
-/* gen/nlist.c */
-int nlist __P((char *name, struct nlist *list));
-#endif
-
-#endif
socketname = index(hostname, separator);
if (socketname) {
*socketname++ = 0;
- Field(socketname, &addr.x_port, 2);
+ Field(socketname, (char *)&addr.x_port, 2);
}
Field(hostname, addr.x_host.c_host, 6);
stdio/fseek.c:long lseek();
stdio/doscan.c:static char *_getccl();
stdio/ftell.c:long lseek();
-stdio/findiop.c:extern char *calloc();
+stdio/findiop.c:extern void *calloc();
stdio/popen.c:extern char *malloc();
stdio/filbuf.c:char *malloc();
compat-4.1/tell.c:long lseek();
memory.h:extern char *memset();
net/res_debug.c:extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
net/res_debug.c:extern char *inet_ntoa();
-net/res_debug.c:extern char *sprintf();
+net/res_debug.c:extern int sprintf();
net/getnetent.c:static char *any();
net/rexec.c:char *index(), *sprintf();
net/rexec.c:char *getpass(), *getlogin();
net/getprotoent.c:static char *any();
net/hosttable/gethostent.c:static char *any();
net/named/gethostnamadr.c:static char *any();
-net/res_mkquery.c:extern char *sprintf();
+net/res_mkquery.c:extern int sprintf();
net/getservent.c:static char *any();
vaxmba/mbavar.h:extern Xmba0int(), Xmba1int(), Xmba2int(), Xmba3int();
vax/inline/inline.h:char *newline(), *copyline(), *doreplaceon();
grep '\.h:' oldprotos.txt >oldprotos.temp
-rm -f machine frame.h errno.h fcntl.h signal.h syslog.h
+rm -f machine frame.h errno.h fcntl.h nlist.h signal.h syslog.h
ln -s vax machine
ln -s machine/frame.h frame.h
ln -s sys/errno.h errno.h
ln -s sys/file.h fcntl.h
+ln -s a.out.h nlist.h
ln -s sys/signal.h signal.h
ln -s sys/syslog.h syslog.h
fi
done <groups.txt
-rm -f errno.h fcntl.h frame.h machine signal.h syslog.h
+rm -f machine frame.h errno.h fcntl.h nlist.h signal.h syslog.h
--- /dev/null
+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;
+ FILE *fi;
+ static char pbuf[9];
+- int (*signal())();
+- int (*sig)();
++ void (*signal())();
++ 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
+@@ -44,19 +44,37 @@
+ cp = key.dptr;
+ tp = line;
+
++#ifdef __STDC__
++#define EXPAND(e) passwd.pw_ ## e = tp; while (*tp++ = *cp++);
++#else
+ #define EXPAND(e) passwd.pw_/**/e = tp; while (*tp++ = *cp++);
++#endif
++#ifdef X_
++/* without this adjustment it tries to access x_passwd.x_pw_x_name etc */
++ EXPAND(nox_name);
++ EXPAND(nox_passwd);
++#else
+ EXPAND(name);
+ EXPAND(passwd);
++#endif
+ bcopy(cp, (char *)&passwd.pw_uid, sizeof (int));
+ cp += sizeof (int);
+ bcopy(cp, (char *)&passwd.pw_gid, sizeof (int));
+ cp += sizeof (int);
+ bcopy(cp, (char *)&passwd.pw_quota, sizeof (int));
+ cp += sizeof (int);
++#ifdef X_
++/* without this adjustment it tries to access x_passwd.x_pw_x_name etc */
++ EXPAND(nox_comment);
++ EXPAND(nox_gecos);
++ EXPAND(nox_dir);
++ EXPAND(nox_shell);
++#else
+ EXPAND(comment);
+ EXPAND(gecos);
+ EXPAND(dir);
+ EXPAND(shell);
++#endif
+ return (&passwd);
+ }
+
+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
+@@ -88,9 +88,6 @@
+ #if defined(DEBUG) || defined(RCHECK)
+ #define ASSERT(p) if (!(p)) botch("p")
+ /*#include <stdio.h>*/
+-static void botch __P((char *s));
+-static findbucket __P((union overhead *freep, int srchlen));
+-
+ static void botch(s) char *s; {
+ fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
+ (void) fflush(stderr); /* just in case user buffered it */
+@@ -100,6 +97,8 @@
+ #define ASSERT(p)
+ #endif
+
++static findbucket __P((union overhead *freep, int srchlen));
++
+ void *malloc(nbytes) unsigned nbytes; {
+ 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
+@@ -70,14 +70,14 @@
+ flags = (flags & ~03) | O_RDWR;
+ strcpy(db->dbm_pagbuf, file);
+ strcat(db->dbm_pagbuf, ".pag");
+- _va_start(argp, fmt);
++ _va_start(argp, flags);
+ db->dbm_pagf = vopen(db->dbm_pagbuf, flags, argp);
+ va_end(argp);
+ if (db->dbm_pagf < 0)
+ goto bad;
+ strcpy(db->dbm_pagbuf, file);
+ strcat(db->dbm_pagbuf, ".dir");
+- _va_start(argp, fmt);
++ _va_start(argp, flags);
+ 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/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
+@@ -15,12 +15,12 @@
+ */
+ /*#include <signal.h>*/
+
+-int (*signal(s, a))() int s; int (*a)(); {
++void (*signal(s, a)) __P((int sig)) int s; void (*a) __P((int sig)); {
+ struct sigvec osv, sv;
+ static int mask[NSIG];
+ static int flags[NSIG];
+
+- sv.sv_handler = a;
++ sv.sv_handler = (void (*) __P((int sig, int code, struct sigcontext *scp)))a;
+ sv.sv_mask = mask[s];
+ sv.sv_flags = flags[s];
+ if (sigvec(s, &sv, &osv) < 0)
+@@ -31,5 +31,5 @@
+ if (sigvec(s, &sv, 0) < 0)
+ return (BADSIG);
+ }
+- return (osv.sv_handler);
++ 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
+@@ -15,7 +15,7 @@
+ /*#include <signal.h>*/
+
+ #define setvec(vec, a) \
+- vec.sv_handler = a; vec.sv_mask = vec.sv_onstack = 0
++ vec.sv_handler = (void (*) __P((int sig, int code, struct sigcontext *scp)))a; vec.sv_mask = vec.sv_onstack = 0
+
+ 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
+@@ -11,7 +11,7 @@
+
+ int system(s) char *s; {
+ int status, pid, w;
+- register int (*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
+@@ -18,7 +18,7 @@
+ #define TICK 10000 /* system clock resolution in microseconds */
+
+ #define setvec(vec, a) \
+- vec.sv_handler = a; vec.sv_mask = vec.sv_onstack = 0
++ vec.sv_handler = (void (*) __P((int sig, int code, struct sigcontext *scp)))a; vec.sv_mask = vec.sv_onstack = 0
+
+ static int ringring;
+
+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
+@@ -9,7 +9,7 @@
+ * @(#)signal.h 7.1 (Berkeley) 6/4/86
+ */
+
+-#ifndef NSIG
++/*#ifndef NSIG*/
+ #define NSIG 32
+
+ #define SIGHUP 1 /* hangup */
+@@ -60,14 +60,25 @@
+ #define SIGUSR2 31 /* user defined signal 2 */
+
+ #ifndef KERNEL
+-int (*signal())();
++/*void (*signal())();*/
+ #endif
+
+ /*
+ * Signal vector "template" used in sigvec call.
+ */
++
++#ifndef __P
++#ifdef __STDC__
++#define __P(args) args
++#else
++#define __P(args) ()
++#endif
++#endif
++
++struct sigcontext; /* forward reference for sv_handler below (in ANSI case) */
++
+ struct sigvec {
+- int (*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 */
+ };
+@@ -100,15 +111,15 @@
+ int sc_ps; /* psl to restore */
+ };
+
+-#define BADSIG (int (*)())-1
+-#define SIG_DFL (int (*)())0
+-#define SIG_IGN (int (*)())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
+-#endif
++#define SIG_CATCH (void (*) __P((int sig)))2
++#define SIG_HOLD (void (*) __P((int sig)))3
+ #endif
++/*#endif*/
+
+ /*
+ * Macro for converting signal number to a mask suitable for
+@@ -117,14 +128,6 @@
+ #define sigmask(m) (1 << ((m)-1))
+
+ #ifndef KERNEL
+-#ifndef __P
+-#ifdef __STDC__
+-#define __P(args) args
+-#else
+-#define __P(args) ()
+-#endif
+-#endif
+-
+ /* gen/psignal.c */
+ int psignal __P((unsigned sig, char *s));
+
+@@ -132,7 +135,7 @@
+ 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)(int sig)))) __P((int sig));
+
+ /* sys/kill.c */
+ int kill __P((int p, int s));
-diff --unified --recursive --new-file libstdc.orig/a.out.h libstdc/a.out.h
---- libstdc.orig/a.out.h 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/a.out.h 2017-01-19 15:17:46.198529987 +1100
-@@ -39,44 +39,4 @@
- :4; /* nothing, yet */
- };
-
--/*
-- * Format of a symbol table entry; this file is included by <a.out.h>
-- * and should be used if you aren't interested the a.out header
-- * or relocation information.
-- */
--struct nlist {
-- union {
-- char *n_name; /* for use when in-core */
-- long n_strx; /* index into file string table */
-- } n_un;
--unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
-- char n_other; /* unused */
-- short n_desc; /* see <stab.h> */
--unsigned long n_value; /* value of this symbol (or sdb offset) */
--};
--#define n_hash n_desc /* used internally by ld */
--
--/*
-- * Simple values for n_type.
-- */
--#define N_UNDF 0x0 /* undefined */
--#define N_ABS 0x2 /* absolute */
--#define N_TEXT 0x4 /* text */
--#define N_DATA 0x6 /* data */
--#define N_BSS 0x8 /* bss */
--#define N_COMM 0x12 /* common (internal to ld) */
--#define N_FN 0x1f /* file name symbol */
--
--#define N_EXT 01 /* external bit, or'ed in */
--#define N_TYPE 0x1e /* mask for all the type bits */
--
--/*
-- * Sdb entries have some of the N_STAB bits set.
-- * These are given in <stab.h>
-- */
--#define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
--
--/*
-- * Format for namelist values.
-- */
--#define N_FORMAT "%08x"
-+#include <nlist.h>
-diff --unified --recursive --new-file libstdc.orig/compat-4.1/ftime.c libstdc/compat-4.1/ftime.c
---- libstdc.orig/compat-4.1/ftime.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/compat-4.1/ftime.c 2017-01-19 15:19:31.050463867 +1100
+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
@@ -10,18 +10,20 @@
#include <sys/types.h>
ftime(tp)
register struct timeb *tp; {
-diff --unified --recursive --new-file libstdc.orig/compat-4.1/gtty.c libstdc/compat-4.1/gtty.c
---- libstdc.orig/compat-4.1/gtty.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/compat-4.1/gtty.c 2017-01-19 15:17:46.198529987 +1100
+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
@@ -15,7 +15,7 @@
#include <sgtty.h>
return(ioctl(fd, TIOCGETP, ap));
}
-diff --unified --recursive --new-file libstdc.orig/compat-4.1/stty.c libstdc/compat-4.1/stty.c
---- libstdc.orig/compat-4.1/stty.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/compat-4.1/stty.c 2017-01-19 15:17:46.198529987 +1100
+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
@@ -15,7 +15,7 @@
#include <sgtty.h>
return(ioctl(fd, TIOCSETP, ap));
}
-diff --unified --recursive --new-file libstdc.orig/compat-4.1/vtimes.c libstdc/compat-4.1/vtimes.c
---- libstdc.orig/compat-4.1/vtimes.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/compat-4.1/vtimes.c 2017-01-19 15:17:46.198529987 +1100
+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
+@@ -10,16 +10,18 @@
+
+ #include <sys/time.h>
+ #include <sys/resource.h>
++#include <sys/times.h>
+
+ /*
+ * Backwards compatible times.
+ */
+-struct tms {
+- int tms_utime; /* user time */
+- int tms_stime; /* system time */
+- int tms_cutime; /* user time, children */
+- int tms_cstime; /* system time, children */
+-};
++/* we now get this from sys/times.h to avoid duplication */
++/*struct tms {*/
++/* int tms_utime;*/ /* user time */
++/* int tms_stime;*/ /* system time */
++/* int tms_cutime;*/ /* user time, children */
++/* int tms_cstime;*/ /* system time, children */
++/*};*/
+
+ 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
@@ -10,23 +10,25 @@
#include <sys/time.h>
vtimes(par, chi)
register struct vtimes *par, *chi; {
-diff --unified --recursive --new-file libstdc.orig/fcntl.h libstdc/fcntl.h
---- libstdc.orig/fcntl.h 2017-01-19 15:17:46.190529992 +1100
+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
+@@ -13,11 +13,15 @@
+ #endif
+
+ char *
+-memccpy(t, f, c, n)
+- register char *t, *f;
++memccpy(_t, _f, c, n)
++ void *_t, *_f;
+ register c, n; {
++#define t (*(char **)&_t)
++#define f (*(char **)&_f)
+ while (--n >= 0)
+ if ((*t++ = *f++) == c)
+ return (t);
+ return (0);
++#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
+@@ -12,12 +12,14 @@
+ static char sccsid[] = "@(#)memchr.c 5.2 (Berkeley) 86/03/09";
+ #endif
+
+-char *
+-memchr(s, c, n)
+- register char *s;
++void *
++memchr(_s, c, n)
++ void *_s;
+ register c, n; {
++#define s (*(char **)&_s)
+ while (--n >= 0)
+ if (*s++ == c)
+ return (--s);
+ 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
+@@ -12,11 +12,15 @@
+ static char sccsid[] = "@(#)memcmp.c 5.2 (Berkeley) 86/03/09";
+ #endif
+
+-memcmp(s1, s2, n)
+- register char *s1, *s2;
++memcmp(_s1, _s2, n)
++ void *_s1, *_s2;
+ register n; {
++#define s1 (*(char **)&_s1)
++#define s2 (*(char **)&_s2)
+ while (--n >= 0)
+ if (*s1++ != *s2++)
+ return (*--s1 - *--s2);
+ return (0);
++#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
+@@ -12,14 +12,18 @@
+ static char sccsid[] = "@(#)memcpy.c 5.2 (Berkeley) 86/03/09";
+ #endif
+
+-char *
+-memcpy(t, f, n)
+- register char *t, *f;
++void *
++memcpy(_t, _f, n)
++ void *_t, *_f;
+ register n; {
++#define t (*(char **)&_t)
++#define f (*(char **)&_f)
+ register char *p = t;
+
+ while (--n >= 0)
+ *t++ = *f++;
+
+ return (p);
++#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
+@@ -12,14 +12,16 @@
+ static char sccsid[] = "@(#)memset.c 5.2 (Berkeley) 86/03/09";
+ #endif
+
+-char *
+-memset(s, c, n)
+- register char *s;
++void *
++memset(_s, c, n)
++ void *_s;
+ register c, n; {
++#define s (*(char **)&_s)
+ register char *p = s;
+
+ while (--n >= 0)
+ *s++ = 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
+++ libstdc/fcntl.h 1970-01-01 10:00:00.000000000 +1000
@@ -1,40 +0,0 @@
-/*
-#define FTRUNC 02000 /* truncate to zero length */
-#define FEXCL 04000 /* error if already created */
-#endif
-diff --unified --recursive --new-file libstdc.orig/gen/fakcu.c libstdc/gen/fakcu.c
---- libstdc.orig/gen/fakcu.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/fakcu.c 2017-01-19 15:21:02.578410269 +1100
+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
+@@ -11,10 +11,11 @@
+ /*
+ * bcmp -- vax cmpc3 instruction
+ */
+-bcmp(b1, b2, length)
+- register char *b1, *b2;
++bcmp(_b1, _b2, length)
++ void *_b1, *_b2;
+ register int length; {
+-
++#define b1 (*(char **)&_b1)
++#define b2 (*(char **)&_b2)
+ if (length == 0)
+ return (0);
+ do
+@@ -22,4 +23,6 @@
+ break;
+ while (--length);
+ return(length);
++#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
+@@ -11,9 +11,11 @@
+ /*
+ * bcopy -- vax movc3 instruction
+ */
+-bcopy(src, dst, length)
+- register char *src, *dst;
++bcopy(_src, _dst, length)
++ void *_src, *_dst;
+ register int length; {
++#define src (*(char **)&_src)
++#define dst (*(char **)&_dst)
+ if (length && src != dst)
+ if ((u_int)dst < (u_int)src)
+ if (((int)src | (int)dst | length) & 3)
+@@ -23,7 +25,7 @@
+ else {
+ length >>= 2;
+ do /* copy by longs */
+- *((long *)dst)++ = *((long *)src)++;
++ *(*(long **)&dst)++ = *(*(long **)&src)++;
+ while (--length);
+ }
+ else { /* copy backwards */
+@@ -36,9 +38,11 @@
+ else {
+ length >>= 2;
+ do /* copy by shorts */
+- *--((long *)dst) = *--((long *)src);
++ *--(*(long **)&dst) = *--(*(long **)&src);
+ while (--length);
+ }
+ }
+ return(0);
++#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
+@@ -11,13 +11,14 @@
+ /*
+ * bzero -- vax movc5 instruction
+ */
+-bzero(b, length)
+- register char *b;
++bzero(_b, length)
++ void *_b;
+ register int length; {
+-
++#define b (*(char **)&_b)
+ if (length)
+ do
+ *b++ = '\0';
+ while (--length);
+ 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
+@@ -5,11 +5,11 @@
+ /*
+ * Calloc - allocate and clear memory block
+ */
+-char *
++void *
+ calloc(num, size)
+ register unsigned num, size; {
+- extern char *malloc();
+- register char *p;
++ extern void *malloc();
++ register void *p;
+
+ size *= num;
+ if (p = malloc(size))
+@@ -18,7 +18,7 @@
+ }
+
+ cfree(p, num, size)
+- char *p;
++ void *p;
+ 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
@@ -6,5 +6,6 @@
* Null cleanup routine to resolve reference in exit()
* if not using stdio.
+void
_cleanup() {
}
-diff --unified --recursive --new-file libstdc.orig/gen/insque.c libstdc/gen/insque.c
---- libstdc.orig/gen/insque.c 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/gen/insque.c 2017-01-19 15:17:46.198529987 +1100
+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
+@@ -62,7 +62,7 @@
+ register char **sp, *cp;
+ register FILE *fp;
+ struct stat statb;
+- extern char *malloc(), *calloc();
++ extern void *malloc(), *calloc();
+
+ if (shells != NULL)
+ free((char *)shells);
+@@ -76,7 +76,7 @@
+ (void)fclose(fp);
+ return(okshells);
+ }
+- if ((strings = malloc((unsigned)statb.st_size)) == NULL) {
++ if ((strings = (char *)malloc((unsigned)statb.st_size)) == NULL) {
+ (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
@@ -8,16 +8,19 @@
static char sccsid[] = "@(#)insque.c 5.1 (Berkeley) 1/27/87";
#endif
insque(e, prev)
register struct vaxque *e, *prev; {
-diff --unified --recursive --new-file libstdc.orig/gen/isatty.c libstdc/gen/isatty.c
---- libstdc.orig/gen/isatty.c 2017-01-19 15:17:46.194529989 +1100
+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
+++ libstdc/gen/isatty.c 1970-01-01 10:00:00.000000000 +1000
@@ -1,17 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
- return(0);
- return(1);
-}
-diff --unified --recursive --new-file libstdc.orig/gen/malloc.c libstdc/gen/malloc.c
---- libstdc.orig/gen/malloc.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/malloc.c 2017-01-19 15:19:41.562457507 +1100
+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
@@ -82,7 +82,7 @@
#if defined(DEBUG) || defined(RCHECK)
#define ASSERT(p) if (!(p)) botch("p")
botch(s)
char *s; {
fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
+@@ -93,7 +93,7 @@
+ #define ASSERT(p)
+ #endif
+
+-char *
++void *
+ malloc(nbytes)
+ unsigned nbytes; {
+ register union overhead *op;
@@ -177,6 +177,7 @@
/*
* Allocate more memory to the indicated bucket.
morecore(bucket)
int bucket; {
register union overhead *op;
-@@ -217,6 +218,7 @@
+@@ -217,8 +218,9 @@
}
}
+void
free(cp)
- char *cp; {
+- char *cp; {
++ void *cp; {
register int size;
+ register union overhead *op;
+
+@@ -257,9 +259,9 @@
+ */
+ int realloc_srchlen = 4; /* 4 should be plenty, -1 =>'s whole list */
+
+-char *
++void *
+ realloc(cp, nbytes)
+- char *cp;
++ void *cp;
+ unsigned nbytes; {
+ register u_int onb, i;
+ union overhead *op;
@@ -352,6 +354,7 @@
* for each size category, the second showing the number of mallocs -
* frees for each size category.
mstats(s)
char *s; {
register int i, j;
-diff --unified --recursive --new-file libstdc.orig/gen/popen.c libstdc/gen/popen.c
---- libstdc.orig/gen/popen.c 2017-01-19 15:17:46.198529987 +1100
+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
+@@ -14,6 +14,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ndbm.h>
++#include <varargs.h>
+
+ #define BYTESIZ 8
+ #undef setbit
+@@ -24,9 +25,11 @@
+ extern int errno;
+
+ DBM *
+-dbm_open(file, flags, mode)
++dbm_open(file, flags, va_alist)
+ char *file;
+- int flags, mode; {
++ int flags;
++ va_dcl {
++ va_list argp;
+ struct stat statb;
+ register DBM *db;
+
+@@ -39,12 +42,16 @@
+ flags = (flags & ~03) | O_RDWR;
+ strcpy(db->dbm_pagbuf, file);
+ strcat(db->dbm_pagbuf, ".pag");
+- db->dbm_pagf = open(db->dbm_pagbuf, flags, mode);
++ va_start(argp);
++ db->dbm_pagf = vopen(db->dbm_pagbuf, flags, argp);
++ va_end(argp);
+ if (db->dbm_pagf < 0)
+ goto bad;
+ strcpy(db->dbm_pagbuf, file);
+ strcat(db->dbm_pagbuf, ".dir");
+- db->dbm_dirf = open(db->dbm_pagbuf, flags, mode);
++ va_start(argp);
++ db->dbm_dirf = vopen(db->dbm_pagbuf, flags, argp);
++ va_end(argp);
+ 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
+@@ -17,7 +17,7 @@
+
+ int errno;
+ int sys_nerr;
+-char *sys_errlist[];
++extern char *sys_errlist[];
+ 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
+++ libstdc/gen/popen.c 1970-01-01 10:00:00.000000000 +1000
@@ -1,77 +0,0 @@
-/*
- (void) sigsetmask(omask);
- return (pid == -1 ? -1 : status);
-}
-diff --unified --recursive --new-file libstdc.orig/gen/qsort.c libstdc/gen/qsort.c
---- libstdc.orig/gen/qsort.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/qsort.c 2017-01-19 15:17:46.198529987 +1100
+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 @@
* It's not...
*/
qst(base, max)
char *base, *max; {
register char c, *i, *j, *jj;
-diff --unified --recursive --new-file libstdc.orig/gen/random.c libstdc/gen/random.c
---- libstdc.orig/gen/random.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/random.c 2017-01-19 15:17:46.198529987 +1100
+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
@@ -222,7 +222,7 @@
if( n < BREAK_1 ) {
if( n < BREAK_0 ) {
}
rand_type = TYPE_0;
rand_deg = DEG_0;
-diff --unified --recursive --new-file libstdc.orig/gen/regex.c libstdc/gen/regex.c
---- libstdc.orig/gen/regex.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/regex.c 2017-01-19 15:17:46.198529987 +1100
+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
@@ -8,8 +8,6 @@
static char sccsid[] = "@(#)regex.c 5.2 (Berkeley) 3/9/86";
#endif
/*
* routines to do regular expression matching
*
-diff --unified --recursive --new-file libstdc.orig/gen/remque.c libstdc/gen/remque.c
---- libstdc.orig/gen/remque.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/remque.c 2017-01-19 15:17:46.202529984 +1100
+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
@@ -8,16 +8,19 @@
static char sccsid[] = "@(#)remque.c 5.1 (Berkeley) 1/27/87";
#endif
remque(e)
register struct vaxque *e; {
-diff --unified --recursive --new-file libstdc.orig/gen/sleep.c libstdc/gen/sleep.c
---- libstdc.orig/gen/sleep.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/sleep.c 2017-01-19 15:17:46.202529984 +1100
-@@ -16,6 +16,7 @@
+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
+@@ -16,9 +16,11 @@
static int ringring;
+void
sleep(n)
unsigned n; {
- int sleepx(), omask;
-@@ -57,8 +58,7 @@
+- int sleepx(), omask;
++ void sleepx();
++ int omask;
+ struct itimerval itv, oitv;
+ register struct itimerval *itp = &itv;
+ struct sigvec vec, ovec;
+@@ -57,8 +59,7 @@
(void) setitimer(ITIMER_REAL, &oitv, (struct itimerval *)0);
}
-
ringring = 1;
}
-diff --unified --recursive --new-file libstdc.orig/gen/syslog.c libstdc/gen/syslog.c
---- libstdc.orig/gen/syslog.c 2017-01-19 15:17:46.198529987 +1100
-+++ libstdc/gen/syslog.c 2017-01-19 15:17:46.202529984 +1100
+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
@@ -54,6 +54,7 @@
extern int errno, sys_nerr;
extern char *sys_errlist[];
(void) close(LogFile);
LogFile = -1;
}
-diff --unified --recursive --new-file libstdc.orig/gen/usleep.c libstdc/gen/usleep.c
---- libstdc.orig/gen/usleep.c 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/gen/usleep.c 2017-01-19 15:17:46.202529984 +1100
-@@ -19,6 +19,7 @@
+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
+@@ -19,9 +19,11 @@
static int ringring;
+void
usleep(n)
unsigned n; {
- int sleepx(), omask;
-@@ -60,8 +61,7 @@
+- int sleepx(), omask;
++ void sleepx();
++ int omask;
+ struct itimerval itv, oitv;
+ register struct itimerval *itp = &itv;
+ struct sigvec vec, ovec;
+@@ -60,8 +62,7 @@
(void) setitimer(ITIMER_REAL, &oitv, (struct itimerval *)0);
}
-
ringring = 1;
}
-diff --unified --recursive --new-file libstdc.orig/gen.h libstdc/gen.h
---- libstdc.orig/gen.h 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/gen.h 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
@@ -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.orig/net/ruserpass.c libstdc/net/ruserpass.c
---- libstdc.orig/net/ruserpass.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/net/ruserpass.c 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -197,6 +197,7 @@
+ }
+ }
+
++/* XXX should be: bp = (bp + sizeof(align) - 1) & ~sizeof(align) ??? */
+ 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
+@@ -58,7 +58,7 @@
+ sin.sin_family = hp->h_addrtype;
+ bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, hp->h_length);
+ sin.sin_port = rport;
+- if (connect(s, (caddr_t)&sin, sizeof (sin), 0) >= 0)
++ if (connect(s, (struct sockaddr *)&sin, sizeof (sin)/*, 0*/) >= 0)
+ break;
+ (void) close(s);
+ if (errno == EADDRINUSE) {
+@@ -106,7 +106,7 @@
+ (void) close(s2);
+ goto bad;
+ }
+- s3 = accept(s2, &from, &len, 0);
++ s3 = accept(s2, (struct sockaddr *)&from, &len/*, 0*/);
+ (void) close(s2);
+ if (s3 < 0) {
+ perror("accept");
+@@ -160,7 +160,7 @@
+ return (-1);
+ for (;;) {
+ sin.sin_port = htons((u_short)*alport);
+- if (bind(s, (caddr_t)&sin, sizeof (sin)) >= 0)
++ if (bind(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0)
+ 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
+@@ -324,7 +324,9 @@
+ }
+
+ static char nbuf[20];
+-extern char *sprintf();
++/* we have taken the portable sprintf() from 4.3tahoe */
++/*extern char *sprintf();*/
++extern int sprintf();
+
+ /*
+ * Return a string for the type
+@@ -380,7 +382,10 @@
+ case T_GID:
+ return("GID");
+ default:
+- return (sprintf(nbuf, "%d", type));
++/* we have taken the portable sprintf() from 4.3tahoe */
++ /*return (sprintf(nbuf, "%d", type));*/
++ sprintf(nbuf, "%d", type);
++ return nbuf;
+ }
+ }
+
+@@ -397,6 +402,9 @@
+ case C_ANY: /* matches any class */
+ return("ANY");
+ default:
+- return (sprintf(nbuf, "%d", class));
++/* we have taken the portable sprintf() from 4.3tahoe */
++ /*return (sprintf(nbuf, "%d", class));*/
++ sprintf(nbuf, "%d", class);
++ 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
+@@ -14,7 +14,10 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+
+-extern char *sprintf();
++/* we have taken the portable sprintf() from 4.3tahoe */
++/*extern char *sprintf();*/
++extern int sprintf();
++
+
+ /*
+ * Form all types of queries.
+@@ -70,7 +73,9 @@
+ if (res_init() == -1)
+ return(-1);
+ if (_res.defdname[0] != '\0')
+- dname = sprintf(dnbuf, "%s.%s", dname, _res.defdname);
++/* we have taken the portable sprintf() from 4.3tahoe */
++ /*dname = sprintf(dnbuf, "%s.%s", dname, _res.defdname);*/
++ sprintf(dname = dnbuf, "%s.%s", dname, _res.defdname);
+ }
+ /*
+ * 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
+@@ -82,7 +82,7 @@
+ #endif
+ continue;
+ }
+- if (connect(s, &(_res.nsaddr_list[ns]),
++ if (connect(s, (struct sockaddr *)&(_res.nsaddr_list[ns]),
+ sizeof(struct sockaddr)) < 0) {
+ terrno = errno;
+ #ifdef DEBUG
+@@ -156,7 +156,7 @@
+ if (s < 0)
+ s = socket(AF_INET, SOCK_DGRAM, 0);
+ #if BSD >= 43
+- if (connect(s, &_res.nsaddr_list[ns],
++ if (connect(s, (struct sockaddr *)&_res.nsaddr_list[ns],
+ 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
+@@ -49,7 +49,7 @@
+ sin.sin_family = hp->h_addrtype;
+ sin.sin_port = rport;
+ bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
+- if (connect(s, &sin, sizeof(sin)) < 0) {
++ if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
+ if (errno == ECONNREFUSED && timo <= 16) {
+ (void) close(s);
+ sleep(timo);
+@@ -83,7 +83,7 @@
+ (void) sprintf(num, "%d", port);
+ (void) write(s, num, strlen(num)+1);
+ { int len = sizeof (from);
+- s3 = accept(s2, &from, &len, 0);
++ s3 = accept(s2, (struct sockaddr *)&from, &len/*, 0*/);
+ 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
@@ -19,6 +19,7 @@
struct utmp *getutmp();
static FILE *cfile;
mkpwclear(sencpasswd,mch,spasswd)
char mch, *spasswd, *sencpasswd; {
register char *skey;
-diff --unified --recursive --new-file libstdc.orig/net.h libstdc/net.h
---- libstdc.orig/net.h 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/net.h 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
@@ -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 */
+u_short ntohs(), htons();
+u_long ntohl(), htonl();
+/*#endif*/
-diff --unified --recursive --new-file libstdc.orig/netinet/in.h libstdc/netinet/in.h
---- libstdc.orig/netinet/in.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/netinet/in.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -90,20 +90,21 @@
*/
#define IP_OPTIONS 1 /* set/get IP per-packet options */
#ifdef KERNEL
extern struct domain inetdomain;
-diff --unified --recursive --new-file libstdc.orig/netinet/ip.h libstdc/netinet/ip.h
---- libstdc.orig/netinet/ip.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/netinet/ip.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -81,7 +81,7 @@
struct in_addr ipt_addr;
n_long ipt_time;
};
/* flag bits for ipt_flg */
-diff --unified --recursive --new-file libstdc.orig/netinet/tcp.h libstdc/netinet/tcp.h
---- libstdc.orig/netinet/tcp.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/netinet/tcp.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -44,7 +44,9 @@
#ifdef lint
#define TCP_MSS 536
#endif
/*
-diff --unified --recursive --new-file libstdc.orig/netns/ns.h libstdc/netns/ns.h
---- libstdc.orig/netns/ns.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/netns/ns.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -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))
#ifdef KERNEL
extern struct domain nsdomain;
-diff --unified --recursive --new-file libstdc.orig/ns/ns_addr.c libstdc/ns/ns_addr.c
---- libstdc.orig/ns/ns_addr.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/ns/ns_addr.c 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file libstdc.pre/nlist.h libstdc/nlist.h
+--- libstdc.pre/nlist.h 2017-01-19 18:01:22.225941066 +1100
++++ libstdc/nlist.h 1970-01-01 10:00:00.000000000 +1000
+@@ -1,46 +0,0 @@
+-/*
+- * Copyright (c) 1980 Regents of the University of California.
+- * All rights reserved. The Berkeley software License Agreement
+- * specifies the terms and conditions for redistribution.
+- *
+- * @(#)nlist.h 5.1 (Berkeley) 5/30/85
+- */
+-
+-/*
+- * Format of a symbol table entry; this file is included by <a.out.h>
+- * and should be used if you aren't interested the a.out header
+- * or relocation information.
+- */
+-struct nlist {
+- char *n_name; /* for use when in-core */
+- unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
+- char n_other; /* unused */
+- short n_desc; /* see <stab.h> */
+- unsigned long n_value; /* value of this symbol (or sdb offset) */
+-};
+-#define n_hash n_desc /* used internally by ld */
+-
+-/*
+- * Simple values for n_type.
+- */
+-#define N_UNDF 0x0 /* undefined */
+-#define N_ABS 0x2 /* absolute */
+-#define N_TEXT 0x4 /* text */
+-#define N_DATA 0x6 /* data */
+-#define N_BSS 0x8 /* bss */
+-#define N_COMM 0x12 /* common (internal to ld) */
+-#define N_FN 0x1f /* file name symbol */
+-
+-#define N_EXT 01 /* external bit, or'ed in */
+-#define N_TYPE 0x1e /* mask for all the type bits */
+-
+-/*
+- * Sdb entries have some of the N_STAB bits set.
+- * These are given in <stab.h>
+- */
+-#define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
+-
+-/*
+- * 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
+@@ -54,7 +54,7 @@
+ socketname = index(hostname, separator);
+ if (socketname) {
+ *socketname++ = 0;
+- Field(socketname, &addr.x_port, 2);
++ Field(socketname, (char *)&addr.x_port, 2);
+ }
+
+ Field(hostname, addr.x_host.c_host, 6);
@@ -62,7 +62,7 @@
return (addr);
}
Field(buf, out, len)
char *buf;
u_char *out;
-diff --unified --recursive --new-file libstdc.orig/stdio/doscan.c libstdc/stdio/doscan.c
---- libstdc.orig/stdio/doscan.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio/doscan.c 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -271,9 +271,10 @@
+ * NUL in the first `prec' characters, and
+ * strlen() will go further.
+ */
+- char *p, *memchr();
++ char *p;
++ void *memchr();
+
+- if (p = memchr(t, 0, prec)) {
++ if (p = (char *)memchr(t, 0, prec)) {
+ 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
@@ -3,7 +3,8 @@
#endif
break;
}
return(1);
-diff --unified --recursive --new-file libstdc.orig/stdio/findiop.c libstdc/stdio/findiop.c
---- libstdc.orig/stdio/findiop.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio/findiop.c 2017-01-19 15:17:46.202529984 +1100
-@@ -89,6 +89,7 @@
+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
+@@ -23,7 +23,7 @@
+ { 0, NULL, NULL, 0, _IOWRT|_IONBF, 2 }, /* stderr */
+ };
+
+-extern char *calloc();
++extern void *calloc();
+
+ static char sbuf[NSTATIC];
+ char *_smallbuf = sbuf;
+@@ -85,10 +85,11 @@
+ for (fp = _iob, iov = iobglue; fp < &_iob[NSTATIC]; /* void */)
+ *iov++ = fp++;
+
+- _smallbuf = calloc(nfiles, sizeof(*_smallbuf));
++ _smallbuf = (char *)calloc(nfiles, sizeof(*_smallbuf));
return (1);
}
_cleanup() {
extern int fclose();
-diff --unified --recursive --new-file libstdc.orig/stdio/fprintf.c libstdc/stdio/fprintf.c
---- libstdc.orig/stdio/fprintf.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio/fprintf.c 2017-01-19 15:17:46.202529984 +1100
+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
@@ -1,31 +1,48 @@
/*
* Copyright (c) 1980 Regents of the University of California.
+ va_end(argp);
+ return(ferror(iop) ? EOF : len);
}
-diff --unified --recursive --new-file libstdc.orig/stdio/popen.c libstdc/stdio/popen.c
---- libstdc.orig/stdio/popen.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/popen.c 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -10,10 +10,11 @@
+
+ #include <stdio.h>
+
+-fread(ptr, size, count, iop)
+- register char *ptr;
++fread(_ptr, size, count, iop)
++ void *_ptr;
+ unsigned size, count;
+ register FILE *iop; {
++#define ptr (*(char **)&_ptr)
+ register int s;
+ int c;
+
+@@ -42,4 +43,5 @@
+ }
+ }
+ 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
+@@ -10,10 +10,11 @@
+
+ #include <stdio.h>
+
+-fwrite(ptr, size, count, iop)
+- register char *ptr;
++fwrite(_ptr, size, count, iop)
++ void *_ptr;
+ unsigned size, count;
+ register FILE *iop; {
++#define ptr (*(char **)&_ptr)
+ register int s;
+
+ s = size * count;
+@@ -45,4 +46,5 @@
+ }
+ }
+ 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
+--- 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
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ (void) sigsetmask(omask);
+ return (pid == -1 ? -1 : status);
+}
-diff --unified --recursive --new-file libstdc.orig/stdio/printf.c libstdc/stdio/printf.c
---- libstdc.orig/stdio/printf.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio/printf.c 2017-01-19 15:17:46.202529984 +1100
+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
@@ -1,11 +1,35 @@
+/*
+ * Copyright (c) 1987 Regents of the University of California.
+ va_end(argp);
+ return(ferror(stdout) ? EOF : len);
}
-diff --unified --recursive --new-file libstdc.orig/stdio/scanf.c libstdc/stdio/scanf.c
---- libstdc.orig/stdio/scanf.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio/scanf.c 2017-01-19 15:17:46.202529984 +1100
+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
@@ -2,29 +2,50 @@
static char sccsid[] = "@(#)scanf.c 5.2 (Berkeley) 3/9/86";
#endif
+ va_end(argp);
+ return len;
}
-diff --unified --recursive --new-file libstdc.orig/stdio/sprintf.c libstdc/stdio/sprintf.c
---- libstdc.orig/stdio/sprintf.c 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio/sprintf.c 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -33,11 +33,11 @@
+ setlinebuf(iop)
+ register FILE *iop; {
+ char *buf;
+- extern char *malloc();
++ extern void *malloc();
+
+ fflush(iop);
+ setbuffer(iop, NULL, 0);
+- buf = malloc(BUFSIZ);
++ buf = (char *)malloc(BUFSIZ);
+ 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
@@ -1,17 +1,40 @@
+/*
+ * Copyright (c) 1987 Regents of the University of California.
+ va_end(argp);
+ return(len);
}
-diff --unified --recursive --new-file libstdc.orig/stdio/vfprintf.c libstdc/stdio/vfprintf.c
---- libstdc.orig/stdio/vfprintf.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/vfprintf.c 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+
+ return (ferror(iop) ? EOF : len);
+}
-diff --unified --recursive --new-file libstdc.orig/stdio/vprintf.c libstdc/stdio/vprintf.c
---- libstdc.orig/stdio/vprintf.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/vprintf.c 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ len = _doprnt(fmt, argp, stdout);
+ return (ferror(stdout) ? EOF : len);
+}
-diff --unified --recursive --new-file libstdc.orig/stdio/vsprintf.c libstdc/stdio/vsprintf.c
---- libstdc.orig/stdio/vsprintf.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/vsprintf.c 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ *f._ptr = 0;
+ return (len);
+}
-diff --unified --recursive --new-file libstdc.orig/stdio.h libstdc/stdio.h
---- libstdc.orig/stdio.h 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/stdio.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -59,7 +59,7 @@
long ftell();
char *fgets();
char *sprintf(); /* too painful to do right */
#endif
# endif
-diff --unified --recursive --new-file libstdc.orig/sys/dir.h libstdc/sys/dir.h
---- libstdc.orig/sys/dir.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/sys/dir.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -32,9 +32,9 @@
* dp->d_ino set to 0.
*/
#define DIRBLKSIZ DEV_BSIZE
#define MAXNAMLEN 255
-diff --unified --recursive --new-file libstdc.orig/sys/isatty.c libstdc/sys/isatty.c
---- libstdc.orig/sys/isatty.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/sys/isatty.c 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -1,3 +1,4 @@
+-void execl(f, a) char *f, *a; {
++#include <varargs.h>
++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
+@@ -1,3 +1,4 @@
+-void execle(f, a) char *f, *a; {
++#include <varargs.h>
++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
+@@ -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
+--- 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
@@ -0,0 +1,17 @@
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)isatty.c 5.2 (Berkeley) 3/9/86";
+ return(0);
+ return(1);
+}
-diff --unified --recursive --new-file libstdc.orig/sys/param.h libstdc/sys/param.h
---- libstdc.orig/sys/param.h 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/sys/param.h 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -1,3 +1,4 @@
+-int open(f, m, stuff) char *f; {
++#include <varargs.h>
++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
@@ -53,15 +53,16 @@
/*
* Signals
+
+/* moved this from sys/types.h */
+#define NBBY 8 /* number of bits in a byte */
-diff --unified --recursive --new-file libstdc.orig/sys/proc.h libstdc/sys/proc.h
---- libstdc.orig/sys/proc.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/sys/proc.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -117,3 +117,8 @@
#define SSEL 0x0400000 /* selecting; wakeup/waiting danger */
#define SLOGIN 0x0800000 /* a login process (legit child of init) */
+#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.orig/sys/select.h libstdc/sys/select.h
---- libstdc.orig/sys/select.h 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/sys/select.h 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -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
+@@ -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
+@@ -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
+--- 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
@@ -0,0 +1,28 @@
+#include <sys/param.h>
+
+#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.orig/sys/tty.h libstdc/sys/tty.h
---- libstdc.orig/sys/tty.h 2017-01-19 15:17:46.190529992 +1100
-+++ libstdc/sys/tty.h 2017-01-19 15:17:46.202529984 +1100
+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
+@@ -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
+@@ -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
@@ -70,20 +70,22 @@
struct ttychars t_chars; /* tty */
struct winsize t_winsize; /* window size */
};
#define TTIPRI 28
-diff --unified --recursive --new-file libstdc.orig/sys/types.h libstdc/sys/types.h
---- libstdc.orig/sys/types.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/sys/types.h 2017-01-19 15:17:46.202529984 +1100
+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
@@ -45,30 +45,32 @@
typedef u_short uid_t;
typedef u_short gid_t;
+/*#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))*/
#endif
-diff --unified --recursive --new-file libstdc.orig/sys/vmmac.h libstdc/sys/vmmac.h
---- libstdc.orig/sys/vmmac.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/sys/vmmac.h 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
+@@ -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
@@ -157,3 +157,10 @@
} \
c->c_lock = 0; \
+/* 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.orig/vax/vmparam.h libstdc/vax/vmparam.h
---- libstdc.orig/vax/vmparam.h 2017-01-19 15:17:46.194529989 +1100
-+++ libstdc/vax/vmparam.h 2017-01-19 15:17:46.202529984 +1100
+diff --unified --recursive --new-file 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
+@@ -0,0 +1,4 @@
++#include <varargs.h>
++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
+@@ -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
+@@ -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
@@ -156,5 +156,6 @@
/*
* BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1
) |../../xify/newline >b
mv b $i
done
+
+rm -rf ../libstdc.post
+cp -r ../libstdc ../libstdc.post
+patch --strip 1 <post.patch
ln -s machine/x_frame.h x_frame.h
ln -s sys/x_errno.h x_errno.h
ln -s sys/x_file.h x_fcntl.h
+ ln -s x_a.out.h x_nlist.h
ln -s sys/x_signal.h x_signal.h
ln -s sys/x_syslog.h x_syslog.h
)
int fputs __P((register char *s, register FILE *iop));
/* stdio/fread.c */
-int fread __P((register char *ptr, unsigned size, unsigned count, register FILE *iop));
+int fread __P((void *_ptr, unsigned size, unsigned count, register FILE *iop));
/* stdio/freopen.c */
FILE *freopen __P((char *file, register char *mode, register FILE *iop));
long ftell __P((register FILE *iop));
/* stdio/fwrite.c */
-int fwrite __P((register char *ptr, unsigned size, unsigned count, register FILE *iop));
+int fwrite __P((void *_ptr, unsigned size, unsigned count, register FILE *iop));
/* stdio/getchar.c */
int getchar __P((void));
* NUL in the first `prec' characters, and
* strlen() will go further.
*/
- char *p, *memchr();
+ char *p;
+ void *memchr();
- if (p = memchr(t, 0, prec)) {
+ if (p = (char *)memchr(t, 0, prec)) {
size = p - t;
if (size > prec)
size = prec;
{ 0, NULL, NULL, 0, _IOWRT|_IONBF, 2 }, /* stderr */
};
-/*extern char *calloc();*/
+/*extern void *calloc();*/
static char sbuf[NSTATIC];
char *_smallbuf = sbuf;
for (fp = _iob, iov = iobglue; fp < &_iob[NSTATIC]; /* void */)
*iov++ = fp++;
- _smallbuf = calloc(nfiles, sizeof(*_smallbuf));
+ _smallbuf = (char *)calloc(nfiles, sizeof(*_smallbuf));
return (1);
}
/*#include <stdio.h>*/
-int fread(ptr, size, count, iop) register char *ptr; unsigned size; unsigned count; register FILE *iop; {
+int fread(_ptr, size, count, iop) void *_ptr; unsigned size; unsigned count; register FILE *iop; {
+#define ptr (*(char **)&_ptr)
register int s;
int c;
}
}
return (size != 0 ? count - ((s + size - 1) / size) : 0);
+#undef ptr
}
/*#include <stdio.h>*/
-int fwrite(ptr, size, count, iop) register char *ptr; unsigned size; unsigned count; register FILE *iop; {
+int fwrite(_ptr, size, count, iop) void *_ptr; unsigned size; unsigned count; register FILE *iop; {
+#define ptr (*(char **)&_ptr)
register int s;
s = size * count;
}
}
return (size != 0 ? count - ((s + size - 1) / size) : 0);
+#undef ptr
}
*/
int setlinebuf(iop) register FILE *iop; {
char *buf;
- extern char *malloc();
+ extern void *malloc();
fflush(iop);
setbuffer(iop, NULL, 0);
- buf = malloc(BUFSIZ);
+ buf = (char *)malloc(BUFSIZ);
if (buf != NULL) {
setbuffer(iop, buf, BUFSIZ);
iop->_flag |= _IOLBF|_IOMYBUF;
int system __P((char *s));
/* sys/execl.c */
-void execl __P((char *f, char *a));
+void execl __P((char *f, ...));
/* sys/execle.c */
-void execle __P((char *f, char *a));
+void execle __P((char *f, ...));
/* sys/exect.c */
void exect __P((char *s, char *v[], char *e[]));
#include <gen.h>
#include <sys/exec.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#define _va_start(argp, arg) va_start(argp, arg)
+#else
+#include <varargs.h>
+#define _va_start(argp, arg) va_start(argp)
+#endif
-void execl(f, a) char *f; char *a; {
+/*#include <varargs.h>*/
+#ifdef __STDC__
+void execl(char *f, ...)
+#else
+void execl(f, va_alist) char *f; va_dcl
+#endif
+{
abort();
}
#include <gen.h>
#include <sys/exec.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#define _va_start(argp, arg) va_start(argp, arg)
+#else
+#include <varargs.h>
+#define _va_start(argp, arg) va_start(argp)
+#endif
-void execle(f, a) char *f; char *a; {
+/*#include <varargs.h>*/
+#ifdef __STDC__
+void execle(char *f, ...)
+#else
+void execle(f, va_alist) char *f; va_dcl
+#endif
+{
abort();
}
#include <sys/errno.h>
#include <sys/param.h>
#include <sys/types.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#endif
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
int mknod __P((char *n, int m, int a));
/* sys/open.c */
-int open __P((char *f, int m, int stuff));
+int open __P((char *f, int m, ...));
/* sys/pipe.c */
int pipe __P((int f[2]));
/* sys/read.c */
-int read __P((int f, char *b, int l));
+int read __P((int f, void *b, int l));
/* sys/readlink.c */
int readlink __P((char *p, char *b, int s));
/* sys/unlink.c */
int unlink __P((char *s));
+/* sys/vopen.c */
+int vopen __P((char *f, int m, va_list argp));
+
/* sys/write.c */
-int write __P((int f, char *b, int l));
+int write __P((int f, void *b, int l));
#endif
#endif
#include <sys/types.h>
/*#include <sys/types.h>*/
-int ioctl(d, r, p) int d; u_long r; char *p; {
+int ioctl(d, r, p) int d; u_long r; void *p; {
abort();
}
int stty __P((int fd, struct sgttyb *ap));
/* sys/ioctl.c */
-int ioctl __P((int d, u_long r, char *p));
+int ioctl __P((int d, u_long r, void *p));
/* sys/isatty.c */
int isatty __P((int f));
#include <gen.h>
#include <sys/file.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#define _va_start(argp, arg) va_start(argp, arg)
+#else
+#include <varargs.h>
+#define _va_start(argp, arg) va_start(argp)
+#endif
-int open(f, m, stuff) char *f; int m; int stuff; {
+/*#include <varargs.h>*/
+#ifdef __STDC__
+int open(char *f, int m, ...)
+#else
+int open(f, m, va_alist) char *f; int m; va_dcl
+#endif
+{
abort();
}
#include <gen.h>
#include <sys/file.h>
-int read(f, b, l) int f; char *b; int l; {
+int read(f, b, l) int f; void *b; int l; {
abort();
}
#include <gen.h>
#include <sys/socket.h>
-int recv(s, b, l, f) int s; char *b; int l; int f; {
+int recv(s, b, l, f) int s; void *b; int l; int f; {
abort();
}
#include <sys/socket.h>
/*#include <sys/socket.h>*/
-int recvfrom(s, b, l, f, fr, fl) int s; char *b; int l; int f; struct sockaddr *fr; int *fl; {
+int recvfrom(s, b, l, f, fr, fl) int s; void *b; int l; int f; struct sockaddr *fr; int *fl; {
abort();
}
#include <gen.h>
#include <sys/socket.h>
-int send(s, m, l, f) int s; char *m; int l; int f; {
+int send(s, m, l, f) int s; void *m; int l; int f; {
abort();
}
#include <sys/socket.h>
/*#include <sys/socket.h>*/
-int sendto(s, m, l, f, t, tl) int s; char *m; int l; int f; struct sockaddr *t; int tl; {
+int sendto(s, m, l, f, t, tl) int s; void *m; int l; int f; struct sockaddr *t; int tl; {
abort();
}
* @(#)signal.h 7.1 (Berkeley) 6/4/86
*/
-#ifndef NSIG
+/*#ifndef NSIG*/
#define NSIG 32
#define SIGHUP 1 /* hangup */
#define SIGUSR2 31 /* user defined signal 2 */
#ifndef KERNEL
-int (*signal())();
+/*void (*signal())();*/
#endif
/*
* Signal vector "template" used in sigvec call.
*/
+
+#ifndef __P
+#ifdef __STDC__
+#define __P(args) args
+#else
+#define __P(args) ()
+#endif
+#endif
+
+struct sigcontext; /* forward reference for sv_handler below (in ANSI case) */
+
struct sigvec {
- int (*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 */
};
int sc_ps; /* psl to restore */
};
-#define BADSIG (int (*)())-1
-#define SIG_DFL (int (*)())0
-#define SIG_IGN (int (*)())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
-#endif
+#define SIG_CATCH (void (*) __P((int sig)))2
+#define SIG_HOLD (void (*) __P((int sig)))3
#endif
+/*#endif*/
/*
* Macro for converting signal number to a mask suitable for
#define sigmask(m) (1 << ((m)-1))
#ifndef KERNEL
-#ifndef __P
-#ifdef __STDC__
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif
-#endif
-
/* gen/psignal.c */
int psignal __P((unsigned sig, char *s));
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)(int sig)))) __P((int sig));
/* sys/kill.c */
int kill __P((int p, int s));
int listen __P((int s, int b));
/* sys/recv.c */
-int recv __P((int s, char *b, int l, int f));
+int recv __P((int s, void *b, int l, int f));
/* sys/recvfrom.c */
-int recvfrom __P((int s, char *b, int l, int f, struct sockaddr *fr, int *fl));
+int recvfrom __P((int s, void *b, int l, int f, struct sockaddr *fr, int *fl));
/* sys/recvmsg.c */
int recvmsg __P((int s, struct msghdr m[], int f));
/* sys/send.c */
-int send __P((int s, char *m, int l, int f));
+int send __P((int s, void *m, int l, int f));
/* sys/sendmsg.c */
int sendmsg __P((int s, struct msghdr m[], int l));
/* sys/sendto.c */
-int sendto __P((int s, char *m, int l, int f, struct sockaddr *t, int tl));
+int sendto __P((int s, void *m, int l, int f, struct sockaddr *t, int tl));
/* sys/setsockopt.c */
int setsockopt __P((int s, int level, int opt, char *buf, int len));
--- /dev/null
+#include <gen.h>
+#include <sys/file.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#define _va_start(argp, arg) va_start(argp, arg)
+#else
+#include <varargs.h>
+#define _va_start(argp, arg) va_start(argp)
+#endif
+
+/*#include <varargs.h>*/
+int vopen(f, m, argp) char *f; int m; va_list argp; {
+ abort();
+}
#include <gen.h>
#include <sys/wait.h>
-/*#include <sys/wait.h>*/
-int wait(s) union wait *s; {
+int wait(s) int *s; {
abort();
}
int wait3 __P((union wait *s, int o, struct rusage *r));
/* sys/wait.c */
-int wait __P((union wait *s));
+int wait __P((int *s));
#endif
#endif
#include <gen.h>
#include <sys/file.h>
-int write(f, b, l) int f; char *b; int l; {
+int write(f, b, l) int f; void *b; int l; {
abort();
}
x_int x_system __P((char *x_s));
/* sys/execl.c */
-void x_execl __P((char *x_f, char *x_a));
+void x_execl __P((char *x_f, ...));
/* sys/execle.c */
-void x_execle __P((char *x_f, char *x_a));
+void x_execle __P((char *x_f, ...));
/* sys/exect.c */
void x_exect __P((char *x_s, char *x_v[], char *x_e[]));
#include <sys/x_errno.h>
#include <sys/x_param.h>
#include <sys/x_types.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#endif
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
x_int x_mknod __P((char *x_n, x_int x_m, x_int x_a));
/* sys/open.c */
-x_int x_open __P((char *x_f, x_int x_m, x_int x_stuff));
+x_int x_open __P((char *x_f, x_int x_m, ...));
/* sys/pipe.c */
x_int x_pipe __P((x_int x_f[2]));
/* sys/read.c */
-x_int x_read __P((x_int x_f, char *x_b, x_int x_l));
+x_int x_read __P((x_int x_f, void *x_b, x_int x_l));
/* sys/readlink.c */
x_int x_readlink __P((char *x_p, char *x_b, x_int x_s));
/* sys/unlink.c */
x_int x_unlink __P((char *x_s));
+/* sys/vopen.c */
+x_int x_vopen __P((char *x_f, x_int x_m, va_list x_argp));
+
/* sys/write.c */
-x_int x_write __P((x_int x_f, char *x_b, x_int x_l));
+x_int x_write __P((x_int x_f, void *x_b, x_int x_l));
#endif
#endif
x_int x_stty __P((x_int x_fd, struct x_sgttyb *x_ap));
/* sys/ioctl.c */
-x_int x_ioctl __P((x_int x_d, x_u_long x_r, char *x_p));
+x_int x_ioctl __P((x_int x_d, x_u_long x_r, void *x_p));
/* sys/isatty.c */
x_int x_isatty __P((x_int x_f));
* @(#)signal.h 7.1 (Berkeley) 6/4/86
*/
-#ifndef x_NSIG
+/*#ifndef NSIG*/
#define x_NSIG 32
#define x_SIGHUP 1 /* hangup */
#define x_SIGUSR2 31 /* user defined signal 2 */
#ifndef x_KERNEL
-x_int (*x_signal())();
+/*void (*signal())();*/
#endif
/*
* Signal vector "template" used in sigvec call.
*/
+
+#ifndef __P
+#ifdef __STDC__
+#define __P(x_args) x_args
+#else
+#define __P(x_args) ()
+#endif
+#endif
+
+struct x_sigcontext; /* forward reference for sv_handler below (in ANSI case) */
+
struct x_sigvec {
- x_int (*x_sv_handler)(); /* signal handler */
+ void (*x_sv_handler) __P((x_int x_sig, x_int x_code, struct x_sigcontext *x_scp)); /* signal handler */
x_int x_sv_mask; /* signal mask to apply */
x_int x_sv_flags; /* see signal options below */
};
x_int x_sc_ps; /* psl to restore */
};
-#define x_BADSIG (x_int (*)())-1
-#define x_SIG_DFL (x_int (*)())0
-#define x_SIG_IGN (x_int (*)())1
+#define x_BADSIG (void (*) __P((x_int x_sig)))-1
+#define x_SIG_DFL (void (*) __P((x_int x_sig)))0
+#define x_SIG_IGN (void (*) __P((x_int x_sig)))1
#ifdef x_KERNEL
-#define x_SIG_CATCH (x_int (*)())2
-#define x_SIG_HOLD (x_int (*)())3
-#endif
+#define x_SIG_CATCH (void (*) __P((x_int x_sig)))2
+#define x_SIG_HOLD (void (*) __P((x_int x_sig)))3
#endif
+/*#endif*/
/*
* Macro for converting signal number to a mask suitable for
#define x_sigmask(x_m) (1 << ((x_m)-1))
#ifndef x_KERNEL
-#ifndef __P
-#ifdef __STDC__
-#define __P(x_args) x_args
-#else
-#define __P(x_args) ()
-#endif
-#endif
-
/* gen/psignal.c */
x_int x_psignal __P((x_unsigned_int x_sig, char *x_s));
x_int x_siginterrupt __P((x_int x_sig, x_int x_flag));
/* gen/signal.c */
-x_int (*x_signal __P((x_int x_s, x_int (*x_a)(void)))) __P((void));
+void (*x_signal __P((x_int x_s, void (*x_a)(x_int x_sig)))) __P((x_int x_sig));
/* sys/kill.c */
x_int x_kill __P((x_int x_p, x_int x_s));
x_int x_listen __P((x_int x_s, x_int x_b));
/* sys/recv.c */
-x_int x_recv __P((x_int x_s, char *x_b, x_int x_l, x_int x_f));
+x_int x_recv __P((x_int x_s, void *x_b, x_int x_l, x_int x_f));
/* sys/recvfrom.c */
-x_int x_recvfrom __P((x_int x_s, char *x_b, x_int x_l, x_int x_f, struct x_sockaddr *x_fr, x_int *x_fl));
+x_int x_recvfrom __P((x_int x_s, void *x_b, x_int x_l, x_int x_f, struct x_sockaddr *x_fr, x_int *x_fl));
/* sys/recvmsg.c */
x_int x_recvmsg __P((x_int x_s, struct x_msghdr x_m[], x_int x_f));
/* sys/send.c */
-x_int x_send __P((x_int x_s, char *x_m, x_int x_l, x_int x_f));
+x_int x_send __P((x_int x_s, void *x_m, x_int x_l, x_int x_f));
/* sys/sendmsg.c */
x_int x_sendmsg __P((x_int x_s, struct x_msghdr x_m[], x_int x_l));
/* sys/sendto.c */
-x_int x_sendto __P((x_int x_s, char *x_m, x_int x_l, x_int x_f, struct x_sockaddr *x_t, x_int x_tl));
+x_int x_sendto __P((x_int x_s, void *x_m, x_int x_l, x_int x_f, struct x_sockaddr *x_t, x_int x_tl));
/* sys/setsockopt.c */
x_int x_setsockopt __P((x_int x_s, x_int x_level, x_int x_opt, char *x_buf, x_int x_len));
x_int x_wait3 __P((union x_wait *x_s, x_int x_o, struct x_rusage *x_r));
/* sys/wait.c */
-x_int x_wait __P((union x_wait *x_s));
+x_int x_wait __P((x_int *x_s));
#endif
#endif
:4; /* nothing, yet */
};
-#include <x_nlist.h>
+/*
+ * Format of a symbol table entry; this file is included by <a.out.h>
+ * and should be used if you aren't interested the a.out header
+ * or relocation information.
+ */
+struct x_nlist {
+ union {
+ char *x_n_name; /* for use when in-core */
+ x_long x_n_strx; /* index into file string table */
+ } x_n_un;
+unsigned char x_n_type; /* type flag, i.e. N_TEXT etc; see below */
+ char x_n_other; /* unused */
+ x_short x_n_desc; /* see <stab.h> */
+x_unsigned_long x_n_value; /* value of this symbol (or sdb offset) */
+};
+#define x_n_hash x_n_desc /* used internally by ld */
+
+/*
+ * Simple values for n_type.
+ */
+#define x_N_UNDF 0x0 /* undefined */
+#define x_N_ABS 0x2 /* absolute */
+#define x_N_TEXT 0x4 /* text */
+#define x_N_DATA 0x6 /* data */
+#define x_N_BSS 0x8 /* bss */
+#define x_N_COMM 0x12 /* common (internal to ld) */
+#define x_N_FN 0x1f /* file name symbol */
+
+#define x_N_EXT 01 /* external bit, or'ed in */
+#define x_N_TYPE 0x1e /* mask for all the type bits */
+
+/*
+ * Sdb entries have some of the N_STAB bits set.
+ * These are given in <stab.h>
+ */
+#define x_N_STAB 0xe0 /* if any of these bits set, a SDB entry */
+
+/*
+ * Format for namelist values.
+ */
+#define x_N_FORMAT "%08x"
#endif
x_long x_atol __P((register char *x_p));
/* gen/bcmp.c */
-x_int x_bcmp __P((register char *x_b1, register char *x_b2, register x_int x_length));
+x_int x_bcmp __P((void *x__b1, void *x__b2, register x_int x_length));
/* gen/bcopy.c */
-x_int x_bcopy __P((register char *x_src, register char *x_dst, register x_int x_length));
+x_int x_bcopy __P((void *x__src, void *x__dst, register x_int x_length));
/* gen/bzero.c */
-x_int x_bzero __P((register char *x_b, register x_int x_length));
+x_int x_bzero __P((void *x__b, register x_int x_length));
/* gen/calloc.c */
-char *x_calloc __P((register x_unsigned_int x_num, register x_unsigned_int x_size));
-x_int x_cfree __P((char *x_p, x_unsigned_int x_num, x_unsigned_int x_size));
+void *x_calloc __P((register x_unsigned_int x_num, register x_unsigned_int x_size));
+x_int x_cfree __P((void *x_p, x_unsigned_int x_num, x_unsigned_int x_size));
/* gen/crypt.c */
x_int x_setkey __P((char *x_key));
x_int x_insque __P((register struct x_vaxque *x_e, register struct x_vaxque *x_prev));
/* gen/malloc.c */
-char *x_malloc __P((x_unsigned_int x_nbytes));
+void *x_malloc __P((x_unsigned_int x_nbytes));
void x_morecore __P((x_int x_bucket));
-void x_free __P((char *x_cp));
-char *x_realloc __P((char *x_cp, x_unsigned_int x_nbytes));
+void x_free __P((void *x_cp));
+void *x_realloc __P((void *x_cp, x_unsigned_int x_nbytes));
void x_mstats __P((char *x_s));
/* gen/mkstemp.c */
#endif
/* compat-sys5/memccpy.c */
-char *x_memccpy __P((register char *x_t, register char *x_f, register x_int x_c, register x_int x_n));
+char *x_memccpy __P((void *x__t, void *x__f, register x_int x_c, register x_int x_n));
/* compat-sys5/memchr.c */
-char *x_memchr __P((register char *x_s, register x_int x_c, register x_int x_n));
+void *x_memchr __P((void *x__s, register x_int x_c, register x_int x_n));
/* compat-sys5/memcmp.c */
-x_int x_memcmp __P((register char *x_s1, register char *x_s2, register x_int x_n));
+x_int x_memcmp __P((void *x__s1, void *x__s2, register x_int x_n));
/* compat-sys5/memcpy.c */
-char *x_memcpy __P((register char *x_t, register char *x_f, register x_int x_n));
+void *x_memcpy __P((void *x__t, void *x__f, register x_int x_n));
/* compat-sys5/memset.c */
-char *x_memset __P((register char *x_s, register x_int x_c, register x_int x_n));
+void *x_memset __P((void *x__s, register x_int x_c, register x_int x_n));
#endif
#endif
#endif
/* gen/ndbm.c */
-x_DBM *x_dbm_open __P((char *x_file, x_int x_flags, x_int x_mode));
+x_DBM *x_dbm_open __P((char *x_file, x_int x_flags, ...));
void x_dbm_close __P((x_DBM *x_db));
x_long x_dbm_forder __P((register x_DBM *x_db, x_datum x_key));
x_datum x_dbm_fetch __P((register x_DBM *x_db, x_datum x_key));
+++ /dev/null
-#include "x_.h"
-
-#ifndef x__NLIST_H_
-#define x__NLIST_H_
-
-/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- *
- * @(#)nlist.h 5.1 (Berkeley) 5/30/85
- */
-
-/*
- * Format of a symbol table entry; this file is included by <a.out.h>
- * and should be used if you aren't interested the a.out header
- * or relocation information.
- */
-struct x_nlist {
- char *x_n_name; /* for use when in-core */
- unsigned char x_n_type; /* type flag, i.e. N_TEXT etc; see below */
- char x_n_other; /* unused */
- x_short x_n_desc; /* see <stab.h> */
- x_unsigned_long x_n_value; /* value of this symbol (or sdb offset) */
-};
-#define x_n_hash x_n_desc /* used internally by ld */
-
-/*
- * Simple values for n_type.
- */
-#define x_N_UNDF 0x0 /* undefined */
-#define x_N_ABS 0x2 /* absolute */
-#define x_N_TEXT 0x4 /* text */
-#define x_N_DATA 0x6 /* data */
-#define x_N_BSS 0x8 /* bss */
-#define x_N_COMM 0x12 /* common (internal to ld) */
-#define x_N_FN 0x1f /* file name symbol */
-
-#define x_N_EXT 01 /* external bit, or'ed in */
-#define x_N_TYPE 0x1e /* mask for all the type bits */
-
-/*
- * Sdb entries have some of the N_STAB bits set.
- * These are given in <stab.h>
- */
-#define x_N_STAB 0xe0 /* if any of these bits set, a SDB entry */
-
-/*
- * Format for namelist values.
- */
-#define x_N_FORMAT "%08x"
-
-#ifndef x_KERNEL
-#ifndef __P
-#ifdef __STDC__
-#define __P(x_args) x_args
-#else
-#define __P(x_args) ()
-#endif
-#endif
-
-/* gen/nlist.c */
-x_int x_nlist __P((char *x_name, struct x_nlist *x_list));
-#endif
-
-#endif
--- /dev/null
+x_a.out.h
\ No newline at end of file
x_int x_fputs __P((register char *x_s, register x_FILE *x_iop));
/* stdio/fread.c */
-x_int x_fread __P((register char *x_ptr, x_unsigned_int x_size, x_unsigned_int x_count, register x_FILE *x_iop));
+x_int x_fread __P((void *x__ptr, x_unsigned_int x_size, x_unsigned_int x_count, register x_FILE *x_iop));
/* stdio/freopen.c */
x_FILE *x_freopen __P((char *x_file, register char *x_mode, register x_FILE *x_iop));
x_long x_ftell __P((register x_FILE *x_iop));
/* stdio/fwrite.c */
-x_int x_fwrite __P((register char *x_ptr, x_unsigned_int x_size, x_unsigned_int x_count, register x_FILE *x_iop));
+x_int x_fwrite __P((void *x__ptr, x_unsigned_int x_size, x_unsigned_int x_count, register x_FILE *x_iop));
/* stdio/getchar.c */
x_int x_getchar __P((void));
l -= 4;
}
else if (
+ (l != 2 || memcmp(p, "X_", 2) != 0) &&
(l != 5 || memcmp(p, "break", 5) != 0) &&
(l != 4 || memcmp(p, "case", 4) != 0) &&
(l != 4 || memcmp(p, "char", 4) != 0) &&
#!/bin/sh
"`dirname "$0"`/xify" |\
-sed -e 's/\(extern\|register\|static\) x_int \(x_u_long\|x_u_short\)/\1 \2/g; s/va_arg(x_argp, x_\(unsigned_\)\?\(short\|int\|long\))/_va_arg_\1\2(x_argp)/g'
+sed -e 's/\(extern\|register\|static\) x_int x_u_\(short\|int\|long\)/\1 x_u_\2/g; s/va_arg(x_argp, x_\(unsigned_\)\?\(short\|int\|long\))/_va_arg_\1\2(x_argp)/g'