From 832cbe34e4d9805da059b80b7ba3648969df497f Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Wed, 8 Feb 2023 11:55:33 -0800 Subject: [PATCH] Oh, LDFLAGS, right... --- implementations/C/Makefile | 3 +-- implementations/C/joy.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/implementations/C/Makefile b/implementations/C/Makefile index 3b5d7e4..97886a3 100644 --- a/implementations/C/Makefile +++ b/implementations/C/Makefile @@ -1,7 +1,6 @@ OBJS=joy.o keywords.o definitions.o -# On FreeBSD gc and gmp are installed in /usr/local/: -STATIC_GCLIB=/usr/local/lib/libgc.a /usr/local/lib/libgmp.a +LDFLAGS=-L/usr/local/lib -lgc -lgmp # Hold my hand, in fact, hold both of them, and pat my head too please. CFLAGS = -ansi -Wall -Wextra -Werror -pedantic -Wstrict-overflow -fno-strict-aliasing -pedantic-errors diff --git a/implementations/C/joy.c b/implementations/C/joy.c index f37f23d..1a5a2ee 100644 --- a/implementations/C/joy.c +++ b/implementations/C/joy.c @@ -236,6 +236,7 @@ concat_lists(JoyList a, JoyList b) { JoyList node; if (!a) return b; + if (!b) return a; node = newJoyList; node->head = a->head; node->tail = concat_lists(a->tail, b);