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 | c81baf94fd62c83c95a70727ad90da88092ccad7 (patch) | |
tree | f032fedb1a68aa9c956128a0eff72ba259d5f39e /Makefile | |
parent | b6082f77bdc720375ca18175f7baa41f15208f85 (diff) | |
download | mandoc-c81baf94fd62c83c95a70727ad90da88092ccad7.tar.gz |
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; \ |