fix build on -current

PR:		43258
Submitted by:	Steven G. Kargl <kargl@troutmask.apl.washington.edu>
This commit is contained in:
Ying-Chieh Liao 2002-09-28 05:51:31 +00:00
parent 7b6a7e6953
commit 184d169376
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=67178
8 changed files with 132 additions and 59 deletions

View file

@ -1,5 +1,5 @@
--- dlxsim/sim.c.orig Thu May 9 04:37:56 1991
+++ dlxsim/sim.c Sat Sep 28 02:42:32 2002
--- dlxsim/sim.c.orig Sun Sep 22 09:32:12 2002
+++ dlxsim/sim.c Sun Sep 22 10:20:30 2002
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
@ -18,12 +18,24 @@
if (!(j = machPtr->fp_units[unitType][i])) break;
else if (j < soonest) soonest = j;
}
@@ -2833,7 +2833,7 @@
@@ -2832,8 +2832,11 @@
static char *errstring()
{
+/*
extern int errno, sys_nerr;
- extern char *sys_errlist[];
+ /* extern char *sys_errlist[]; */
extern char *sys_errlist[];
+*/
+ extern int errno;
static char msgbuf[64];
if( !errno )
@@ -2842,7 +2845,7 @@
sprintf( msgbuf, "unknown error %d", errno );
return msgbuf;
}
- return sys_errlist[ errno ];
+ return (char *)(sys_errlist[ errno ]);
}
/*

View file

@ -1,32 +0,0 @@
--- gcc/gcc.c.orig Mon Aug 13 14:03:57 1990
+++ gcc/gcc.c Sat Dec 26 12:59:35 1998
@@ -1867,7 +1867,9 @@
char *name;
{
extern int errno, sys_nerr;
+ /*
extern char *sys_errlist[];
+ */
char *s;
if (errno < sys_nerr)
@@ -1881,7 +1883,9 @@
char *name;
{
extern int errno, sys_nerr;
+ /*
extern char *sys_errlist[];
+ */
char *s;
if (errno < sys_nerr)
@@ -1895,7 +1899,9 @@
char *name;
{
extern int errno, sys_nerr;
+ /*
extern char *sys_errlist[];
+ */
char *s;
if (errno < sys_nerr)

View file

@ -1,22 +0,0 @@
--- gcc/cccp.c.orig Mon Aug 13 14:03:34 1990
+++ gcc/cccp.c Sat Dec 26 13:05:53 1998
@@ -4752,7 +4752,9 @@
int i;
FILE_BUF *ip = NULL;
extern int errno, sys_nerr;
+ /*
extern char *sys_errlist[];
+ */
for (i = indepth; i >= 0; i--)
if (instack[i].fname != NULL) {
@@ -5389,7 +5391,9 @@
char *name;
{
extern int errno, sys_nerr;
+ /*
extern char *sys_errlist[];
+ */
fprintf (stderr, "%s: ", progname);
if (errno < sys_nerr)

View file

@ -0,0 +1,22 @@
--- gcc/cccp.c.orig Sun Sep 22 10:45:02 2002
+++ gcc/cccp.c Sun Sep 22 10:46:22 2002
@@ -4751,8 +4751,7 @@
{
int i;
FILE_BUF *ip = NULL;
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
+ extern int errno;
for (i = indepth; i >= 0; i--)
if (instack[i].fname != NULL) {
@@ -5388,8 +5387,7 @@
perror_with_name (name)
char *name;
{
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
+ extern int errno;
fprintf (stderr, "%s: ", progname);
if (errno < sys_nerr)

View file

@ -0,0 +1,32 @@
--- gcc/gcc.c.orig Sun Sep 22 10:38:27 2002
+++ gcc/gcc.c Sun Sep 22 10:39:33 2002
@@ -1866,8 +1866,7 @@
pfatal_with_name (name)
char *name;
{
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
+ extern int errno;
char *s;
if (errno < sys_nerr)
@@ -1880,8 +1879,7 @@
perror_with_name (name)
char *name;
{
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
+ extern int errno;
char *s;
if (errno < sys_nerr)
@@ -1894,8 +1892,7 @@
perror_exec (name)
char *name;
{
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
+ extern int errno;
char *s;
if (errno < sys_nerr)

View file

@ -0,0 +1,22 @@
--- dlxsim/tcl/glob.c.orig Sun Sep 22 09:40:54 2002
+++ dlxsim/tcl/glob.c Sun Sep 22 09:43:49 2002
@@ -122,9 +122,8 @@
#define direct dirent
#define DP_NAMELEN(x) strlen ((x)->d_name)
#else
-#include <sys/dir.h>
+#include <dirent.h>
#include <strings.h>
-extern bcopy ();
#endif /* USG */
#endif /* USG_OLD */
@@ -341,7 +340,7 @@
};
DIR *d;
- register struct direct *dp;
+ register struct dirent *dp;
struct globval *lastlink;
register struct globval *nextlink;
register char *nextname;

View file

@ -0,0 +1,29 @@
--- dlxsim/tcl/tclCmdAH.c.orig Sun Sep 22 09:45:45 2002
+++ dlxsim/tcl/tclCmdAH.c Sun Sep 22 10:02:26 2002
@@ -17,7 +17,7 @@
#ifndef lint
static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclCmdAH.c,v 1.38 90/01/15 15:15:48 ouster Exp Locker: ouster $ SPRITE (Berkeley)";
-#endif not lint
+#endif
#include <ctype.h>
#include <errno.h>
@@ -413,7 +413,7 @@
* id. */
void (*oldHandler)();
int handlerSet = 0;
- union wait status;
+ int status;
char *cmdName;
/*
@@ -557,7 +557,7 @@
execSignalled = 0;
deadPid = wait3(&status, WNOHANG, (struct rusage *) 0);
if (deadPid == pid) {
- result = status.w_T.w_Retcode;
+ result = WIFEXITED(status);
}
/*

View file

@ -0,0 +1,10 @@
--- dlxsim/trap.c.orig Sat Sep 28 12:56:28 2002
+++ dlxsim/trap.c Sat Sep 28 12:56:34 2002
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <values.h>
#include <tcl.h>
#include <sys/errno.h>
#include "asm.h"