Skip to content
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ae1c8fd
Fix compilation with Dinkumware headers older than version 601 on Fre…
matthargett Oct 3, 2018
9b1b034
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Oct 3, 2018
2174a0e
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Oct 18, 2018
c842407
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Nov 7, 2018
119e83c
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Nov 8, 2018
947134e
Resolve merge conflicts.
matthargett Jan 28, 2019
bc9205e
Fix botched merge.
matthargett Jan 28, 2019
87d1135
Fall back to stdint.h is cstdint (and friends) aren't available. Use …
matthargett Jan 30, 2019
6f3cc60
Fix Linux build and test linkage errors.
matthargett Jan 31, 2019
3bdecf5
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Jan 31, 2019
ced6175
Remove folly-config.h
matthargett Jan 31, 2019
12b5b37
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Feb 8, 2019
4faea92
After upgrading to newer Dinkumare, was able to remove many header-le…
matthargett Feb 25, 2019
0f0dfab
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Feb 25, 2019
c3dbbfb
Cleanup based on feedback and newer Dinkumware/FreeBSD headers.
matthargett Feb 27, 2019
6025757
Minor changes based on feedback for consistency.
matthargett Feb 28, 2019
2431427
Add explicit header check and error out if no platform checks are true.
matthargett Mar 26, 2019
fa548ad
Merge branch 'master' of github.com:facebook/folly into dinkumware_build
matthargett Mar 26, 2019
b560eb6
Master added some DCHECK macros without adding explicit includes wher…
matthargett Mar 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions folly/Conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <folly/Demangle.h>
#include <folly/Expected.h>
#include <folly/FBString.h>
#include <folly/GLog.h>
#include <folly/Likely.h>
#include <folly/Range.h>
#include <folly/Traits.h>
Expand Down
2 changes: 1 addition & 1 deletion folly/FBString.h
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@ operator<<(
os.setstate(_ostream_type::badbit | _ostream_type::failbit);
}
}
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) || (_CPPLIB_VER <= 800)
typedef decltype(os.precision()) streamsize;
// MSVC doesn't define __ostream_insert
os.write(str.data(), static_cast<streamsize>(str.size()));
Expand Down
4 changes: 3 additions & 1 deletion folly/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS
*/
#if defined(_MSC_VER)
#define FOLLY_TLS __declspec(thread)
#elif defined(__GNUC__) || defined(__clang__)
#elif (defined(__GNUC__) || defined(__clang__))
#define FOLLY_TLS __thread
#else
#error cannot define platform specific thread local storage
Expand All @@ -219,7 +219,9 @@ FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS
// the 'std' namespace; the latter uses inline namespaces. Wrap this decision
// up in a macro to make forward-declarations easier.
#if FOLLY_USE_LIBCPP
#if __has_include(<__config>)
#include <__config> // @manual
#endif
#define FOLLY_NAMESPACE_STD_BEGIN _LIBCPP_BEGIN_NAMESPACE_STD
#define FOLLY_NAMESPACE_STD_END _LIBCPP_END_NAMESPACE_STD
#else
Expand Down
2 changes: 1 addition & 1 deletion folly/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ fbstring errnoStr(int err) {
#elif FOLLY_HAVE_XSI_STRERROR_R || defined(__APPLE__)

// Using XSI-compatible strerror_r
int r = strerror_r(err, buf, sizeof(buf));
auto r = strerror_r(err, buf, sizeof(buf));

// OSX/FreeBSD use EINVAL and Linux uses -1 so just check for non-zero
if (r != 0) {
Expand Down
8 changes: 4 additions & 4 deletions folly/Traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@ namespace traits_detail_IsNothrowSwappable {
// enabled.
template <typename T>
using IsNothrowSwappable = std::is_nothrow_swappable<T>;
#elif _CPPLIB_VER
// MSVC defines the base even if C++17 is disabled, and MSVC has
// issues with our fallback implementation due to over-eager
// evaluation of noexcept.
#elif _CPPLIB_VER > 800
// MSVC 2015+ defines the base even if C++17 is disabled, and
// MSVC 2015 has issues with our fallback implementation due to
// over-eager evaluation of noexcept.
template <typename T>
using IsNothrowSwappable = std::_Is_nothrow_swappable<T>;
#else
Expand Down
2 changes: 0 additions & 2 deletions folly/detail/ThreadLocalDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include <string>
#include <vector>

#include <glog/logging.h>

#include <folly/Exception.h>
#include <folly/Function.h>
#include <folly/Portability.h>
Expand Down
1 change: 1 addition & 0 deletions folly/dynamic-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <folly/CPortability.h>
#include <folly/Conv.h>
#include <folly/Format.h>
#include <glog/logging.h>
#include <folly/Likely.h>
#include <folly/detail/Iterators.h>
#include <folly/lang/Exception.h>
Expand Down
4 changes: 2 additions & 2 deletions folly/memory/Malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ mallctlbymib(const size_t*, size_t, void*, size_t*, void*, size_t)

// for malloc_usable_size
// NOTE: FreeBSD 9 doesn't have malloc.h. Its definitions
// are found in stdlib.h.
#if __has_include(<malloc.h>)
// are found in stdlib.h and it errors when including malloc.h.
#if __has_include(<malloc.h>) && !defined(__STDC__)
#include <malloc.h>
#else
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion folly/portability/Malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// malloc_usable_size, and that's what we should be using.
#include <jemalloc/jemalloc.h>
#else
#ifndef __APPLE__
#if !defined(__APPLE__) && !defined(__STDC__)
#include <malloc.h>
#endif

Expand Down
6 changes: 6 additions & 0 deletions folly/system/ThreadId.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#include <folly/portability/Unistd.h>
#include <folly/portability/Windows.h>

#if __has_include(<pthread_np.h>)
#include <pthread_np.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Orvid Do we want this include here or in the portability header?

#endif

namespace folly {

/**
Expand Down Expand Up @@ -82,6 +86,8 @@ inline uint64_t getOSThreadID() {
uint64_t tid;
pthread_threadid_np(nullptr, &tid);
return tid;
#elif __has_include(<pthread_np.h>)
return uint64_t(pthread_getthreadid_np());
#elif _WIN32
return uint64_t(GetCurrentThreadId());
#else
Expand Down