aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mansearch.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2012-06-09 11:00:13 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2012-06-09 11:00:13 +0000
commitedbd1fa554d38a3f19ff970c944800ddf36ac396 (patch)
treeb222233773ffd22fd69619a83584ed4101b26b02 /mansearch.c
parent23b47a76c2d0b34fa0a6e8bdea1f0c5db87aac33 (diff)
downloadmandoc-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 'mansearch.c')
-rw-r--r--mansearch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mansearch.c b/mansearch.c
index e3502b99..70e6ad05 100644
--- a/mansearch.c
+++ b/mansearch.c
@@ -1,4 +1,4 @@
-/* $Id: mansearch.c,v 1.3 2012/06/08 15:06:28 kristaps Exp $ */
+/* $Id: mansearch.c,v 1.4 2012/06/09 11:00:13 kristaps Exp $ */
/*
* Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -30,7 +30,11 @@
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_OHASH
#include <ohash.h>
+#else
+#include "compat_ohash.h"
+#endif
#include <sqlite3.h>
#include "mandoc.h"