Commit 02f942e3 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Always include bits/c++config.h if possible

Summary: [Folly] Always `#include <bits/c++config.h>` if possible from `folly/portability/Config.h`. This is the libstdc++ (glibcxx) version/config/features header, so include it alongside the corresponding glibc version/config/features header.

Differential Revision: D15209040

fbshipit-source-id: 6f624283f58523d74317f3d998aa99c1c50ee2b3
parent 0669cd92
...@@ -45,11 +45,6 @@ ...@@ -45,11 +45,6 @@
#include <folly/CppAttributes.h> #include <folly/CppAttributes.h>
#include <folly/Portability.h> #include <folly/Portability.h>
// libc++ doesn't provide this header, nor does msvc
#if __has_include(<bits/c++config.h>)
#include <bits/c++config.h>
#endif
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
......
...@@ -25,17 +25,6 @@ ...@@ -25,17 +25,6 @@
#include <folly/Portability.h> #include <folly/Portability.h>
// libc++ doesn't provide this header, nor does msvc
#if __has_include(<bits/c++config.h>)
// This file appears in two locations: inside fbcode and in the
// libstdc++ source code (when embedding fbstring as std::string).
// To aid in this schizophrenic use, two macros are defined in
// c++config.h:
// _LIBSTDCXX_FBSTRING - Set inside libstdc++. This is useful to
// gate use inside fbcode v. libstdc++
#include <bits/c++config.h>
#endif
#define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \ #define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \
template <typename TTheClass_> \ template <typename TTheClass_> \
struct classname##__folly_traits_impl__ { \ struct classname##__folly_traits_impl__ { \
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#include <features.h> // @manual #include <features.h> // @manual
#endif #endif
#if __has_include(<bits/c++config.h>)
#include <bits/c++config.h> // @manual
#endif
#ifdef __ANDROID__ #ifdef __ANDROID__
#include <android/api-level.h> // @manual #include <android/api-level.h> // @manual
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment