fix rest of non-portable includes
authorJames Sedgwick <jsedgwick@fb.com>
Thu, 15 Jun 2017 06:03:28 +0000 (23:03 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 15 Jun 2017 06:04:35 +0000 (23:04 -0700)
Summary: According to internal linter

Reviewed By: Orvid

Differential Revision: D5051010

fbshipit-source-id: febdeca05ac1cf3ad82617169f90912a445cf173

folly/detail/Futex.cpp
folly/experimental/symbolizer/Elf.cpp
folly/experimental/symbolizer/SignalHandler.cpp
folly/experimental/symbolizer/Symbolizer.cpp
folly/test/ChronoTest.cpp

index edaa279..f8a8dbc 100644 (file)
  */
 
 #include <folly/detail/Futex.h>
+#include <boost/intrusive/list.hpp>
+#include <folly/Hash.h>
+#include <folly/ScopeGuard.h>
+#include <folly/portability/SysSyscall.h>
 #include <stdint.h>
 #include <string.h>
+#include <cerrno>
 #include <condition_variable>
 #include <mutex>
-#include <boost/intrusive/list.hpp>
-#include <folly/Hash.h>
-#include <folly/ScopeGuard.h>
 
 #ifdef __linux__
-# include <errno.h>
-# include <linux/futex.h>
-# include <sys/syscall.h>
+#include <linux/futex.h>
 #endif
 
 using namespace std::chrono;
index 07fa3b2..cc64386 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2017-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 #include <folly/experimental/symbolizer/Elf.h>
 
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
+#include <folly/portability/SysMman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include <string>
 
index b1837f4..49fbb20 100644 (file)
@@ -21,7 +21,6 @@
 #include <pthread.h>
 #include <signal.h>
 #include <sys/types.h>
-#include <unistd.h>
 
 #include <algorithm>
 #include <atomic>
@@ -36,6 +35,7 @@
 #include <folly/experimental/symbolizer/ElfCache.h>
 #include <folly/experimental/symbolizer/Symbolizer.h>
 #include <folly/portability/SysSyscall.h>
+#include <folly/portability/Unistd.h>
 
 namespace folly { namespace symbolizer {
 
index 25d367c..56d8e2a 100644 (file)
@@ -21,7 +21,6 @@
 #include <iostream>
 #include <limits.h>
 #include <link.h>
-#include <unistd.h>
 
 #ifdef __GNUC__
 #include <ext/stdio_filebuf.h>
 #include <folly/ScopeGuard.h>
 #include <folly/String.h>
 
-#include <folly/experimental/symbolizer/Elf.h>
 #include <folly/experimental/symbolizer/Dwarf.h>
+#include <folly/experimental/symbolizer/Elf.h>
 #include <folly/experimental/symbolizer/LineReader.h>
-
+#include <folly/portability/Unistd.h>
 
 /*
  * This is declared in `link.h' on Linux platforms, but apparently not on the
index 9142ab6..3b4a431 100644 (file)
@@ -15,8 +15,7 @@
  */
 
 #include <folly/Chrono.h>
-
-#include <gtest/gtest.h>
+#include <folly/portability/GTest.h>
 
 using namespace std::chrono;
 using namespace folly::chrono;