Homebrew/homebrew — pull request #32826 by jacknagel (2014-10-01 00:49:41+00:00)
Title: Post-install audit for shadowed header files

After tracking down the cause of https://github.com/Homebrew/homebrew/issues/32510 / https://github.com/keithw/mosh/issues/543, I think we should audit `include` for headers that shadow system header files.

When Homebrew is installed in `/usr/local`, these will always override headers in `/usr/include`, because compilers search `/usr/local/include` first by design. But even when Homebrew is installed somewhere else, adding `-I#{HOMEBREW_PREFIX}/include` will cause the same problem.

Keg-only formulae are exempt from the check, as they often do install such files (curl, readline, openssl, etc.).