From f22d56f1242caf44fa20a85da0d9829b086bd965 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index dd5fa488..d14cb0f3 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -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