diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2012-06-09 11:00:13 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2012-06-09 11:00:13 +0000 |
commit | edbd1fa554d38a3f19ff970c944800ddf36ac396 (patch) | |
tree | b222233773ffd22fd69619a83584ed4101b26b02 /Makefile | |
parent | 23b47a76c2d0b34fa0a6e8bdea1f0c5db87aac33 (diff) | |
download | mandoc-edbd1fa554d38a3f19ff970c944800ddf36ac396.tar.gz mandoc-edbd1fa554d38a3f19ff970c944800ddf36ac396.tar.zst mandoc-edbd1fa554d38a3f19ff970c944800ddf36ac396.zip |
Add a compatibility interface for ohash.
This include's espie@'s wholesale src/lib/libc/ohash directory from OpenBSD
into compat_ohash.c (with a single copyright/license notice at the top)
and src/include/ohash.h as compat_ohash.h.
The ohash_int.h part of compat_ohash.c has been changed only in that ohash.h
points to compat_ohash.h.
Added HAVE_OHASH test (test-ohash.c) to Makefile.
In mandocdb.c and mansearch.c, check HAVE_OHASH test for inclusion.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -147,6 +147,7 @@ SRCS = Makefile \ test-fgetln.c \ test-getsubopt.c \ test-mmap.c \ + test-ohash.c \ test-strlcat.c \ test-strlcpy.c \ test-strptime.c \ @@ -187,6 +188,7 @@ LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ COMPAT_OBJS = compat_fgetln.o \ compat_getsubopt.o \ + compat_ohash.o \ compat_strlcat.o \ compat_strlcpy.o @@ -203,7 +205,7 @@ $(LIBMAN_OBJS): libman.h $(LIBMDOC_OBJS): libmdoc.h $(LIBROFF_OBJS): libroff.h $(LIBMANDOC_OBJS): mandoc.h mdoc.h man.h libmandoc.h config.h -$(COMPAT_OBJS): config.h +$(COMPAT_OBJS): config.h compat_ohash.h MANDOC_HTML_OBJS = eqn_html.o \ html.o \ @@ -396,6 +398,10 @@ config.h: config.h.pre config.h.post rm -f config.log ( cat config.h.pre; \ echo; \ + if $(CC) $(CFLAGS) -Werror -o test-ohash test-ohash.c >> config.log 2>&1; then \ + echo '#define HAVE_OHASH'; \ + rm test-ohash; \ + fi; \ if $(CC) $(CFLAGS) -Werror -o test-fgetln test-fgetln.c >> config.log 2>&1; then \ echo '#define HAVE_FGETLN'; \ rm test-fgetln; \ |