Hello,
When building flex on clang 8.0.1 (i386) I noticed that assert()
expands to nothing. This happens because of a fallback declaration
of assert() in flexdef.h when HAVE_ASSERT_H is not set. Instead of
changing flexdef.h the following patch follows the existing pattern
in Makefile of adding -DHAVE_SOMETHING. Does this look OK?
- Michael
Index: Makefile
===================================================================
RCS file: /cvs/src/usr.bin/lex/Makefile,v
retrieving revision 1.17
diff -u -p -u -r1.17 Makefile
--- Makefile 30 Apr 2017 20:30:39 -0000 1.17
+++ Makefile 16 Sep 2019 08:55:42 -0000
@@ -12,7 +12,7 @@
# To bootstrap lex, cp initscan.c to scan.c and run make.
PROG= lex
-CFLAGS+=-I. -I${.CURDIR} -DHAVE_CONFIG_H
+CFLAGS+=-I. -I${.CURDIR} -DHAVE_CONFIG_H -DHAVE_ASSERT_H
SRCS= buf.c ccl.c dfa.c ecs.c filter.c gen.c main.c misc.c \
nfa.c options.c parse.y regex.c scan.l scanflags.c \
scanopt.c skel.c sym.c tables.c tables_shared.c \