man @1.6g_0: add Xcode man pages to search path
man @1.6g_0 cannot find man pages provided by Xcode, while /usr/bin/man
will:
$ man -w clang
No manual entry for clang
$ /usr/bin/man -w clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1/clang.1
Apple patched /usr/bin/man
to add the Xcode location to the search paths by obtaining these paths from libxcselect. Unfortunately, the macOS SDK does not include the referenced xcselect.h
header file. This modified patch recreates the necessary declarations from the context of this patch.
This patch can be applied for all versions of the Mac operation system with libxcselect. As far as I know, this should be the case for >= 10.9. I added this as a variant in order to allow users to disable this feature and retain the previous behavior.
I would say go ahead and commit this - it worked when I tried it last - mww hasn't been active recently