SHA256
1
0
forked from pool/bin86
bin86/dev86-0.16.0.dif

308 lines
6.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- Makefile
+++ Makefile
@@ -11,10 +11,11 @@
ELKSSRC= /usr/src/elks
PREFIX= /usr
-LIBPRE= $(PREFIX)/bcc
+LIBPRE= $(PREFIX)/lib/bcc
BINDIR= $(PREFIX)/bin
-LIBDIR= $(LIBPRE)/lib/bcc
-CFLAGS= -O
+MANDIR= $(PREFIX)/man
+LIBDIR= $(LIBPRE)
+CFLAGS= -O2 -m486 -fno-strength-reduce
# Some makes take the last of a list as the default ...
all: make.fil
@@ -38,6 +39,7 @@
-e "s:%PREFIX%:$(PREFIX):" \
-e "s:%LIBPRE%:$(LIBPRE):" \
-e "s:%BINDIR%:$(BINDIR):" \
+ -e "s:%MANDIR%:$(MANDIR):" \
-e "s:%LIBDIR%:$(LIBDIR):" \
-e "s:%ELKSSRC%:$(ELKSSRC):" \
-e "s:%CC%:$(CC):" \
@@ -64,9 +66,9 @@
rm -f $(BINDIR)/objdump86 $(BINDIR)/nm86 $(BINDIR)/size86
rm -f /lib/elksemu
rm -f /usr/lib/liberror.txt
- rm -f /usr/man/man1/elks.1* /usr/man/man1/elksemu.1*
- rm -f /usr/man/man1/dis86.1* /usr/man/man1/bcc.1*
- rm -f /usr/man/man1/as86.1* /usr/man/man1/ld86.1*
+ rm -f $(MANDIR)/man1/elks.1* $(MANDIR)/man1/elksemu.1*
+ rm -f $(MANDIR)/man1/dis86.1* $(MANDIR)/man1/bcc.1*
+ rm -f $(MANDIR)/man1/as86.1* $(MANDIR)/man1/ld86.1*
@# TO HERE
distribution:
--- ar/ar.c
+++ ar/ar.c
@@ -28,6 +28,7 @@
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#include "ar.h"
#include "rel_aout.h"
@@ -35,16 +36,12 @@
#define HAVE_RENAME
#undef HAVE_FSYNC
#define SHORT_FILENAME
-extern char **sys_errlist;
-extern int sys_nerr;
#else
#define HAVE_FCHMOD
#define HAVE_RENAME
#undef HAVE_FSYNC
#endif
-extern int errno;
-
#ifdef __GNUC__
# ifndef alloca
# define alloca __builtin_alloca
@@ -500,7 +497,7 @@
break;
default:
- usage ("invalid operation %d", operation);
+ usage ("invalid operation %d", (char *) operation);
}
exit (0);
@@ -669,7 +666,7 @@
chmod (member.name, member.mode);
#endif
if (ferror (ostream) || fclose (ostream) != 0)
- error ("%s: I/O error", member.name);
+ error ("%s: I/O error", member.name, NULL, NULL, NULL);
if (preserve_dates)
{
@@ -816,7 +813,7 @@
{
register struct mapelt *found = find_mapelt_noerror (map, name);
if (found == 0)
- error ("no member named `%s'", name);
+ error ("no member named `%s'", name, NULL, NULL, NULL);
return found;
}
@@ -1076,7 +1073,7 @@
}
header->ar_name[sizeof (header->ar_name) - 1] = '\0';
error ("member name `%s' truncated to `%s'",
- mapelt->info.name, header->ar_name);
+ mapelt->info.name, header->ar_name, NULL, NULL);
}
#if defined(USG) || defined(HAVE_TRAILING_SLASH_IN_NAME)
{
@@ -1275,7 +1272,7 @@
{
struct mapelt *map = make_map (0);
char **p;
- struct mapelt *after_mapelt;
+ struct mapelt *after_mapelt = NULL;
struct mapelt mapstart;
struct mapelt *change_map;
@@ -1337,7 +1334,7 @@
{
struct mapelt *map = make_map (1);
struct mapelt mapstart;
- struct mapelt *after_mapelt;
+ struct mapelt *after_mapelt = NULL;
struct mapelt *change_map;
char **p;
int changed;
@@ -1980,7 +1977,7 @@
usage (s1, s2)
char *s1, *s2;
{
- error (s1, s2);
+ error (s1, s2, NULL, NULL, NULL);
fprintf (stderr, "\
Usage: %s [d|m|p|q|r|t|x [[abi [position-name] [cilouv]] archive file...\n",
program_name);
@@ -1990,10 +1987,9 @@
/* Print error message and exit. */
void
-fatal (s1, s2)
- char *s1, *s2;
+fatal (char *s1, char *s2)
{
- error (s1, s2);
+ error (s1, s2, NULL, NULL, NULL);
exit (1);
}
@@ -2027,12 +2023,11 @@
char *name;
{
char *s;
-
- if (errno < sys_nerr)
- s = concat ("", sys_errlist[errno], " for %s");
- else
+ int m_errno = errno;
+ s = concat ("", strerror(errno), " for %s");
+ if (m_errno != errno)
s = "unknown error for %s";
- error (s, name);
+ error (s, name, NULL, NULL, NULL);
}
void
@@ -2040,10 +2035,9 @@
char *name;
{
char *s;
-
- if (errno < sys_nerr)
- s = concat ("", sys_errlist[errno], " for %s");
- else
+ int m_errno = errno;
+ s = concat ("", strerror(errno), " for %s");
+ if (m_errno != errno)
s = "cannot open %s";
fatal (s, name);
}
@@ -2089,7 +2083,7 @@
{
char *result = realloc (ptr, size);
if (result == 0)
- fatal ("virtual memory exhausted");
+ fatal ("virtual memory exhausted", 0);
return result;
}
--- bcc/Makefile
+++ bcc/Makefile
@@ -4,13 +4,13 @@
#
PREFIX=/usr
-LIBPRE=$(PREFIX)
+LIBPRE=$(PREFIX)/lib/bcc
CFLAGS =-O
LDFLAGS =-s
BINDIR =$(PREFIX)/bin
-LIBDIR =$(LIBPRE)/lib/bcc
-BCCDEFS =-DLOCALPREFIX=$(LIBPRE) -DBINDIR=$(BINDIR) -DDEFARCH=0
+LIBDIR =$(LIBPRE)
+BCCDEFS =-DLOCALPREFIX=$(PREFIX) -DBINDIR=$(BINDIR) -DDEFARCH=0
OBJS = bcc-cc1.o codefrag.o debug.o declare.o express.o exptree.o floatop.o \
function.o gencode.o genloads.o glogcode.o hardop.o input.o label.o \
--- bcc/bcc.c
+++ bcc/bcc.c
@@ -3,6 +3,7 @@
/* Copyright (C) 1992 Bruce Evans */
#define _POSIX_SOURCE 1
+#define _BSD_SOURCE 1
#include <sys/types.h>
#include <sys/stat.h>
@@ -961,10 +962,14 @@
for(d=s=ptr; d && *s; s=d)
{
+#ifdef PATH_MAX
+ char buf[PATH_MAX];
+#else
#ifdef MAXPATHLEN
char buf[MAXPATHLEN];
#else
- char buf[1024];
+ char buf[4096];
+#endif
#endif
free(temp);
--- dis88/Makefile
+++ dis88/Makefile
@@ -28,6 +28,7 @@
CFLAGS=-O
LDFLAGS=
PREFIX=/usr
+MANDIR=$(PREFIX)/man
OBJ = disrel.o dismain.o distabs.o dishand.o disfp.o
@@ -37,8 +38,8 @@
$(CC) $(LDFLAGS) -o dis88 $(OBJ)
install: dis88
- install -m 755 -s dis88 $(DIST)$(PREFIX)/bin/dis86
- install -m 644 dis88.1 $(DIST)$(PREFIX)/man/man1/dis86.1
+ install -m 755 dis88 $(DIST)$(PREFIX)/bin/dis86
+ install -m 644 dis88.1 $(DIST)$(MANDIR)/man1/dis86.1
$(OBJ): dis.h a.out.h
--- elksemu/Makefile
+++ elksemu/Makefile
@@ -39,7 +39,7 @@
# to redirect.
install: elksemu
install -d $(DIST)/lib
- install -s -o root -g root -m 4555 elksemu $(DIST)/lib/elksemu
+ install -o root -g root -m 4555 elksemu $(DIST)/lib/elksemu
clean realclean:
rm -f $(OBJ) binfmt_elks.o elksemu call_tab.v defn_tab.v
--- ld/dumps.c
+++ ld/dumps.c
@@ -2,6 +2,7 @@
/* Copyright (C) 1994 Bruce Evans */
+#include <string.h>
#include "const.h"
#include "obj.h"
#include "type.h"
--- makefile.in
+++ makefile.in
@@ -68,13 +68,13 @@
# Alter these if for some reason you don't want this done as root.
#ifdef __BCC__
-INDAT=-o root -g root -m 644
-INEXE=-o root -g root -m 755
-INSCR=-o root -g root -m 755
+INDAT=-m 644
+INEXE=-m 755
+INSCR=-m 755
#else
-INDAT=-o root -g root -m 644
-INEXE=-o root -g root -m 755 -s
-INSCR=-o root -g root -m 755
+INDAT=-m 644
+INEXE=-m 755
+INSCR=-m 755
#endif
#ifdef GNUMAKE
@@ -102,6 +102,7 @@
LIBPRE= %LIBPRE%
BINDIR= %BINDIR%
LIBDIR= %LIBDIR%
+MANDIR= %MANDIR%
#ifdef GNUMAKE
export ELKSSRC
@@ -214,7 +215,7 @@
#endif
install-man:
- -$(MAKEC) man MANDIR=$(DIST)$(PREFIX)/man install
+ -$(MAKEC) man MANDIR=$(DIST)$(MANDIR) install
install-lib: lib/lib0-done lib/lib2-done
install -d $(DISTLIB)/i86