Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.

Some Include What You Use suggestions were used too.

Use anonymous namespaces in source files.

Differential revision: http://reviews.llvm.org/D18778

llvm-svn: 265454
diff --git a/llvm/lib/Support/Errno.cpp b/llvm/lib/Support/Errno.cpp
index 3ba2a12..888887c 100644
--- a/llvm/lib/Support/Errno.cpp
+++ b/llvm/lib/Support/Errno.cpp
@@ -14,11 +14,9 @@
 #include "llvm/Support/Errno.h"
 #include "llvm/Config/config.h"     // Get autoconf configuration settings
 #include "llvm/Support/raw_ostream.h"
-#include <string.h>
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
+#include <cstring>
+#include <string>
 
 //===----------------------------------------------------------------------===//
 //=== WARNING: Implementation here must contain only TRULY operating system
@@ -32,7 +30,7 @@
 std::string StrError() {
   return StrError(errno);
 }
-#endif  // HAVE_ERRNO_H
+#endif // HAVE_ERRNO_H
 
 std::string StrError(int errnum) {
   std::string str;
@@ -72,5 +70,5 @@
   return str;
 }
 
-}  // namespace sys
-}  // namespace llvm
+} // namespace sys
+} // namespace llvm