From 9f2575ce5e5935955af02607666f71805d504796 Mon Sep 17 00:00:00 2001 From: Carlo Dapor Date: Sun, 13 Aug 2017 20:03:13 +0200 Subject: [PATCH 1/2] Argument to abs() is actually long, not int, thus use labs(). --- flisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flisp.c b/flisp.c index 4202b34..08f5c4b 100644 --- a/flisp.c +++ b/flisp.c @@ -1791,7 +1791,7 @@ static value_t apply_cl(uint32_t nargs) i = GET_INT32(ip); ip+=4; n = GET_INT32(ip); ip+=4; s = GET_INT32(ip); ip+=4; - nargs = process_keys(v, i, n, abs(s)-(i+n), bp, nargs, s<0); + nargs = process_keys(v, i, n, labs(s)-(i+n), bp, nargs, s<0); NEXT_OP; #ifndef USE_COMPUTED_GOTO From 5d480a2944a16a22fcaad448cd0822b45858b222 Mon Sep 17 00:00:00 2001 From: Carlo Dapor Date: Sun, 13 Aug 2017 20:15:45 +0200 Subject: [PATCH 2/2] Both clang and gcc define both MACOSX and ARCH_X86_64, no need to explicitly define them in the Makfiles. --- Makefile.macosx | 2 +- llt/Makefile.macosx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.macosx b/Makefile.macosx index 502fa10..7c3f879 100644 --- a/Makefile.macosx +++ b/Makefile.macosx @@ -10,7 +10,7 @@ LIBTARGET = lib$(NAME) LLTDIR = llt LLT = $(LLTDIR)/libllt.a -CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -I$(CARBON_HEADERS) +CONFIG = -DBITS64 -D__CPU__=686 -I$(CARBON_HEADERS) FLAGS = -falign-functions -Wall -Wno-strict-aliasing -I$(LLTDIR) $(CFLAGS) -DUSE_COMPUTED_GOTO $(CONFIG) LIBFILES = $(LLT) LIBS = $(LIBFILES) -lm -framework ApplicationServices diff --git a/llt/Makefile.macosx b/llt/Makefile.macosx index 5fb5353..f20ffc5 100644 --- a/llt/Makefile.macosx +++ b/llt/Makefile.macosx @@ -9,7 +9,7 @@ TARGET = libllt.a # OS flags: LINUX, WIN32, MACOSX # architecture flags: __CPU__=xxx, BITS64, ARCH_X86, ARCH_X86_64 -CONFIG = -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 +CONFIG = -DBITS64 -D__CPU__=686 FLAGS = -Wall -Wno-strict-aliasing $(CFLAGS) $(CONFIG) LIBS =