aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-31 23:03:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-31 23:03:47 +0000
commit9df73edf21694f640f489f84755d19ea5ca9ddaa (patch)
tree5f24336d2f3e26dd6c8ed3c3f2c38334f3176952 /Makefile
parent310ed617af04919775625b014c2aa960f4be781d (diff)
downloadmandoc-9df73edf21694f640f489f84755d19ea5ca9ddaa.tar.gz
mandoc-9df73edf21694f640f489f84755d19ea5ca9ddaa.tar.zst
mandoc-9df73edf21694f640f489f84755d19ea5ca9ddaa.zip
Provide strcasestr(3) and strsep(3) for Solaris 10 compat;
reported missing by Matthias Scheler <tron at NetBSD> via wiz@.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8e6a42df..5209ccf9 100644
--- a/Makefile
+++ b/Makefile
@@ -67,8 +67,10 @@ SRCS = Makefile \
chars.in \
compat_fgetln.c \
compat_getsubopt.c \
+ compat_strcasestr.c \
compat_strlcat.c \
compat_strlcpy.c \
+ compat_strsep.c \
config.h.post \
config.h.pre \
demandoc.1 \
@@ -190,8 +192,10 @@ LIBMANDOC_OBJS = $(LIBMAN_OBJS) \
COMPAT_OBJS = compat_fgetln.o \
compat_getsubopt.o \
compat_ohash.o \
+ compat_strcasestr.o \
compat_strlcat.o \
- compat_strlcpy.o
+ compat_strlcpy.o \
+ compat_strsep.o
arch.o: arch.in
att.o: att.in
@@ -386,6 +390,14 @@ config.h: config.h.pre config.h.post
echo '#define HAVE_STRLCPY'; \
rm test-strlcpy; \
fi; \
+ if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strcasestr test-strcasestr.c >> config.log 2>&1; then \
+ echo '#define HAVE_STRCASESTR'; \
+ rm test-strcasestr; \
+ fi; \
+ if $(CC) $(CFLAGS) -Werror -Wno-unused -o test-strsep test-strsep.c >> config.log 2>&1; then \
+ echo '#define HAVE_STRSEP'; \
+ rm test-strsep; \
+ fi; \
echo; \
cat config.h.post \
) > $@