From 93655eba07a9e1c3055f7c38018324e1d3b8b1c8 Mon Sep 17 00:00:00 2001 From: dmcoles Date: Tue, 5 Mar 2024 14:30:39 +0000 Subject: [PATCH] amiga specific updates --- SCOPTIONS | 1 + SMakefile | 6 +++--- amiga.c | 5 +++-- function.c | 1 + glob/fnmatch.c | 2 +- main.c | 2 +- output.c | 2 +- read.c | 6 ++++++ 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/SCOPTIONS b/SCOPTIONS index f89daae..11a0221 100644 --- a/SCOPTIONS +++ b/SCOPTIONS @@ -11,3 +11,4 @@ DEFINE NO_ARCHIVES IGNORE=161 IGNORE=100 STARTUP=cres +MATH=Standard \ No newline at end of file diff --git a/SMakefile b/SMakefile index 160af57..68e9f75 100644 --- a/SMakefile +++ b/SMakefile @@ -123,12 +123,12 @@ TEXI2DVI = texi2dvi ETAGS = etags -w CTAGS = ctags -w -#guile = guile.o +guile = guile.o objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \ rule.o implicit.o default.o variable.o expand.o function.o \ vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \ - output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) \ + load.o output.o remote-$(REMOTE).o $(GETOPT) $(ALLOCA) \ $(extras) $(guile) srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \ @@ -165,7 +165,7 @@ make.ps: make.dvi dvi2ps make.dvi > make.ps make: $(objs) glob/glob.lib - $(CC) Link $(LDFLAGS) $(objs) $(LOADLIBES) To make.new + $(CC) Link $(LDFLAGS) $(objs) $(GLOB) $(LOADLIBES) To make.new -delete quiet make rename make.new make diff --git a/amiga.c b/amiga.c index cfd0d08..a0f7394 100644 --- a/amiga.c +++ b/amiga.c @@ -23,8 +23,9 @@ this program. If not, see . */ #include #include -static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n" - "Amiga Port by A. Digulla (digulla@home.lake.de)"; +static const char Amiga_version[] = "$VER: Make 4.2 (05.03.24) \n" + "Amiga Port by A. Digulla (digulla@home.lake.de)\n" + "Updates by Darren Coles\n"; int MyExecute (char **argv) diff --git a/function.c b/function.c index b7f0e56..5af0347 100644 --- a/function.c +++ b/function.c @@ -1909,6 +1909,7 @@ func_shell_base (char *o, char **argv, int trim_newlines) BPTR child_stdout; char tmp_output[FILENAME_MAX]; unsigned int maxlen = 200, i; + char **command_argv; int cc; char * buffer, * ptr; char ** aptr; diff --git a/glob/fnmatch.c b/glob/fnmatch.c index 4da8c5f..ae2769e 100644 --- a/glob/fnmatch.c +++ b/glob/fnmatch.c @@ -30,7 +30,7 @@ USA. */ #include #include -#if HAVE_STRING_H || defined _LIBC +#if defined HAVE_STRING_H || defined _LIBC # include #else # include diff --git a/main.c b/main.c index 576f2e9..af416ea 100644 --- a/main.c +++ b/main.c @@ -46,7 +46,7 @@ this program. If not, see . */ #endif #ifdef _AMIGA -int __stack = 20000; /* Make sure we have 20K of stack space */ +long __stack = 20000; /* Make sure we have 20K of stack space */ #endif #ifdef VMS int vms_use_mcr_command = 0; diff --git a/output.c b/output.c index 65182c4..3ee2c3d 100644 --- a/output.c +++ b/output.c @@ -157,7 +157,7 @@ log_working_directory (int entering) static void set_append_mode (int fd) { -#if defined(F_GETFL) && defined(F_SETFL) && defined(O_APPEND) +#if defined(F_GETFL) && defined(F_SETFL) && defined(O_APPEND) && ! defined _AMIGA int flags = fcntl (fd, F_GETFL, 0); if (flags >= 0) fcntl (fd, F_SETFL, flags | O_APPEND); diff --git a/read.c b/read.c index b870aa8..f84c68d 100644 --- a/read.c +++ b/read.c @@ -18,6 +18,8 @@ this program. If not, see . */ #include +#include + #include "filedef.h" #include "dep.h" #include "job.h" @@ -1092,6 +1094,10 @@ eval (struct ebuffer *ebuf, int set_default) colonp > p2 && isalpha ((unsigned char)colonp[-1]) && (colonp == p2 + 1 || strchr (" \t(", colonp[-2]) != 0)) colonp = find_char_unquote (colonp + 1, MAP_COLON); +#endif +#ifdef _AMIGA + while (colonp && !(isspace(colonp[1]) || !colonp[1] || isspace(colonp[-1]))) + colonp = find_char_unquote (colonp + 1, MAP_COLON); #endif if (colonp != 0) break;