Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bug in test; found by AddressSanitizer

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177355 91177308-0d34-0410-b5e6-96231b3b80d8