aports/main/dev86/gcc14.patch
2024-08-22 17:36:15 +00:00

266 lines
5.6 KiB
Diff

diff --git a/bcc/dbprintf.c b/bcc/dbprintf.c
index a77a012..ae9b3a9 100644
--- a/bcc/dbprintf.c
+++ b/bcc/dbprintf.c
@@ -1,6 +1,7 @@
#include <sys/types.h>
#include <fcntl.h>
+#include <unistd.h>
#if defined(__STDC__) && !defined(__FIRST_ARG_IN_AX__)
#include <stdarg.h>
@@ -10,6 +11,10 @@
#define va_strt(p,i) va_start(p)
#endif
+extern int strlen();
+
+int vdbprintf(register __const char *fmt, register va_list ap);
+
#if defined(__STDC__) && !defined(__FIRST_ARG_IN_AX__)
int dbprintf(const char * fmt, ...)
#else
diff --git a/cpp/cpp.c b/cpp/cpp.c
index a6e7337..1ca4422 100644
--- a/cpp/cpp.c
+++ b/cpp/cpp.c
@@ -545,7 +545,7 @@ chget()
}
static void
-unchget(ch)
+unchget(int ch)
{
#if CPP_DEBUG
fprintf(stderr, "\b", ch);
diff --git a/ld/catimage.c b/ld/catimage.c
index 1f5e160..7808916 100644
--- a/ld/catimage.c
+++ b/ld/catimage.c
@@ -27,6 +27,15 @@
#endif
#include "x86_aout.h"
+extern int memcmp();
+
+void fatal(char * str);
+void open_obj(char * fname);
+void copy_segment(long out_offset, long in_offset, long length);
+void patch_bin(long file_off, int value);
+void read_symtable();
+void fatal(char * str);
+
#ifndef __OUT_OK
#error "Compile error: struct exec invalid (long not 32 bit ?)"
#endif
@@ -39,7 +48,7 @@ FILE * ofd;
FILE * ifd = 0;
struct exec header;
-main(argc, argv)
+void main(argc, argv)
int argc;
char ** argv;
{
@@ -100,7 +109,7 @@ char ** argv;
exit(0);
}
-open_obj(fname)
+void open_obj(fname)
char * fname;
{
input_file = fname;
@@ -117,7 +126,7 @@ char * fname;
fatal("Input file has bad magic number");
}
-copy_segment(out_offset, in_offset, length)
+void copy_segment(out_offset, in_offset, length)
long out_offset, in_offset, length;
{
char buffer[1024];
@@ -143,7 +152,7 @@ long out_offset, in_offset, length;
}
}
-patch_bin(file_off, value)
+void patch_bin(file_off, value)
long file_off;
int value;
{
@@ -163,7 +172,7 @@ int value;
}
}
-read_symtable()
+void read_symtable()
{
struct nlist item;
int nitems;
@@ -234,7 +243,7 @@ read_symtable()
}
}
-fatal(str)
+void fatal(str)
char * str;
{
fprintf(stderr, "catimage:%s: %s\n", input_file, str);
diff --git a/ld/objchop.c b/ld/objchop.c
index c7631c1..7d09619 100644
--- a/ld/objchop.c
+++ b/ld/objchop.c
@@ -6,9 +6,12 @@
#endif
#include "x86_aout.h"
+void fatal(char * str);
+void write_file(char * fname, long bsize);
+
#ifndef __OUT_OK
-main()
+void main()
{
fprintf(stderr, "Compile error: struct exec invalid\n");
exit(1);
@@ -19,7 +22,7 @@ main()
FILE * ifd;
struct exec header;
-main(argc, argv)
+void main(argc, argv)
int argc;
char ** argv;
{
@@ -56,7 +59,7 @@ char ** argv;
exit(0);
}
-write_file(fname, bsize)
+void write_file(fname, bsize)
char * fname;
long bsize;
{
@@ -81,7 +84,7 @@ long bsize;
fclose(ofd);
}
-fatal(str)
+void fatal(str)
char * str;
{
fprintf(stderr, "objchop: %s\n", str);
diff --git a/unproto/strsave.c b/unproto/strsave.c
index c2a4b15..4c0da01 100644
--- a/unproto/strsave.c
+++ b/unproto/strsave.c
@@ -28,6 +28,9 @@ static char strsave_sccsid[] = "@(#) strsave.c 1.1 92/01/15 21:53:13";
extern char *strcpy();
extern char *malloc();
+extern int hash();
+extern int strcmp();
+extern int strlen();
/* Application-specific stuff */
diff --git a/unproto/symbol.c b/unproto/symbol.c
index ce9f7d9..77da585 100644
--- a/unproto/symbol.c
+++ b/unproto/symbol.c
@@ -44,6 +44,9 @@ static char symbol_sccsid[] = "@(#) symbol.c 1.4 92/02/15 18:59:56";
extern char *strcpy();
extern char *malloc();
+extern int strcmp();
+extern int strlen();
+extern int hash();
/* Application-specific stuff */
diff --git a/unproto/tok_class.c b/unproto/tok_class.c
index 38ccd0d..efe623b 100644
--- a/unproto/tok_class.c
+++ b/unproto/tok_class.c
@@ -53,6 +53,7 @@ static char class_sccsid[] = "@(#) tok_class.c 1.4 92/01/15 21:53:02";
extern char *strcpy();
extern long time();
extern char *ctime();
+extern int strlen();
/* Application-specific stuff */
diff --git a/unproto/tok_io.c b/unproto/tok_io.c
index 3cae52e..edb2b36 100644
--- a/unproto/tok_io.c
+++ b/unproto/tok_io.c
@@ -85,6 +85,8 @@ extern char *strchr();
extern char *malloc();
extern char *realloc();
extern char *strcpy();
+extern int strlen();
+extern int atoi();
/* Application-specific stuff */
@@ -228,7 +230,7 @@ static int do_control()
}
out_line = in_line = line; /* synchronize */
out_path = in_path = path; /* synchronize */
- return;
+ return 0;
#ifdef IGNORE_DIRECTIVES
@@ -247,7 +249,7 @@ static int do_control()
do {
tok_free(t);
} while (t->tokno != '\n' && (t = tok_get()));
- return;
+ return 0;
}
}
}
@@ -259,12 +261,12 @@ static int do_control()
do {
tok_flush(t);
} while (t->tokno != '\n' && (t = tok_get()));
- return;
+ return 0;
case 0:
/* Hit EOF, punt. */
put_ch('#');
- return;
+ return 0;
}
}
}
diff --git a/unproto/unproto.c b/unproto/unproto.c
index 1f29bff..b17b6e4 100644
--- a/unproto/unproto.c
+++ b/unproto/unproto.c
@@ -143,6 +143,7 @@ extern void exit();
extern int optind;
extern char *optarg;
extern int getopt();
+extern int strcmp();
/* Application-specific stuff */
diff --git a/ar/ar.c b/ar/ar.c
index f808a3a..fce2ab7 100644
--- a/ar/ar.c
+++ b/ar/ar.c
@@ -612,7 +612,7 @@ print_descr (member, instream)
return;
}
print_modes (member.mode);
- timestring = ctime (&member.date);
+ timestring = ctime ((const time_t *)&member.date);
printf (" %2d/%2d %6d %12.12s %4.4s %s\n",
member.uid, member.gid,
member.size, timestring + 4, timestring + 20,