From 481fa37c9d12175d129ac739a8959a5da5a6d478 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 21 Jan 2015 22:41:49 +0000 Subject: Support homebrew-style linking on Mac OS X. Idea found together with Alexis Hildebrandt . --- mandocdb.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index b403ceb9..6ae390be 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.183 2015/01/15 04:26:40 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.184 2015/01/21 22:41:49 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -613,7 +613,11 @@ treescan(void) say(path, "&realpath"); continue; } - if (strstr(buf, basedir) != buf) { + if (strstr(buf, basedir) != buf +#ifdef HOMEBREWDIR + && strstr(buf, HOMEBREWDIR) != buf +#endif + ) { if (warnings) say("", "%s: outside base directory", buf); continue; @@ -818,6 +822,10 @@ filescan(const char *file) start = buf; else if (strstr(buf, basedir) == buf) start = buf + strlen(basedir); +#ifdef HOMEBREWDIR + else if (strstr(buf, HOMEBREWDIR) == buf) + start = buf; +#endif else { exitcode = (int)MANDOCLEVEL_BADARG; say("", "%s: outside base directory", buf); -- cgit v1.2.3