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);