This patch moves a few functions from sanitizer_linux_libcdep.cc to sanitizer_posix_libcdep.cc in order to use them on OS X as well. Plus a few more small build fixes.
This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point.