From 6ca321dc723345b81022178f5d0e67004b4f0cdf Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 30 May 2016 16:05:07 -0700 Subject: [PATCH] Include rather than Summary: This changes includes of `` to ``. The ultimate goal of all of this is to get HHVM compiling on Windows with MSVC 2015. At the moment there are no plans to support MCRouter, Squangle, or AFDT under Windows. There are also no current plans to support MinGW or Cygwin. Now, on to the headers themselves. There are three primary kinds of portability headers. - Replacement headers. These are headers such as `` that MSVC simply does not have. These headers should always be included instead of the headers they are replacing. - Additive headers. These are headers, such as `` that MSVC has, but are either missing functions, or has the functions but under a different name. The portability headers for these only needs to be included instead of the original header if you are using a function that MSVC does not have. The reason for this is that forcing the use of the portability header for `` just because MSVC doesn't have `mkdtemp` and `realpath` would just be messy. - Utility headers. These are portability headers, such as `Memory.h` that exist to provide a portable interface to various things, in this case the allocation and freeing of aligned memory. They are not implementing any existing API, and all contents are in the `folly` namespace. The API's implemented in the first and second types of headers are intended as drop-in replacements for the Linux versions, however they only implement the functions and features that are actually needed, and are not intended as feature-complete replacements. They are not intended for use outside of Facebook projects. Any API's expecting text input expect them to be in the same encoding as the Posix API's define, in most cases that means UTF-8. Anywhere in the portability headers that fails to account for this is a bug, and should be pointed out in the diff (if it's still in review), or else by filing a task detailing the issue and assigning it to me. For all headers, if there is a mechanism in C++11, or else in Folly itself, that allows the same functionality, that mechanism should be used instead of adding a function to the portability headers. Reviewed By: swtaarrs, yfeldblum Differential Revision: D3095643 fbshipit-source-id: 3a5c0029f95b03ea320725df88e14a67ca38a445 --- folly/Random.cpp | 2 +- folly/experimental/EventCount.h | 2 +- folly/test/AtomicHashMapTest.cpp | 2 +- folly/test/MPMCQueueTest.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/folly/Random.cpp b/folly/Random.cpp index ef2e8b9c..f27092f2 100644 --- a/folly/Random.cpp +++ b/folly/Random.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #ifdef _MSC_VER # include diff --git a/folly/experimental/EventCount.h b/folly/experimental/EventCount.h index 7c491542..e45be5a5 100644 --- a/folly/experimental/EventCount.h +++ b/folly/experimental/EventCount.h @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,6 +26,7 @@ #include #include +#include namespace folly { diff --git a/folly/test/AtomicHashMapTest.cpp b/folly/test/AtomicHashMapTest.cpp index 4e5000d2..9082ddd6 100644 --- a/folly/test/AtomicHashMapTest.cpp +++ b/folly/test/AtomicHashMapTest.cpp @@ -18,12 +18,12 @@ #include #include -#include #include #include #include #include #include +#include using std::vector; using std::string; diff --git a/folly/test/MPMCQueueTest.cpp b/folly/test/MPMCQueueTest.cpp index e3cd980c..d42f402a 100644 --- a/folly/test/MPMCQueueTest.cpp +++ b/folly/test/MPMCQueueTest.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include -- 2.34.1