Skip to content

Commit

Permalink
break the folly/Portability.h dependency on SysTypes.h
Browse files Browse the repository at this point in the history
Summary: Portability.h does not need to include SysTypes.h. This avoids bringing in basetsd.h and some non-portable typedefs in typical code that just wants to use Folly.

Reviewed By: Gownta

Differential Revision: D42044843

fbshipit-source-id: 27ba1c5298d936c85a03f0b5159259f8f31fc693
  • Loading branch information
chadaustin authored and facebook-github-bot committed Aug 10, 2023
1 parent cb4d204 commit d969a5c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions folly/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <folly/FBString.h>
#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/portability/SysTypes.h>

namespace folly {

Expand Down
1 change: 0 additions & 1 deletion folly/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ constexpr bool kIsSanitize = false;
// MSVC specific defines
// mainly for posix compat
#ifdef _MSC_VER
#include <folly/portability/SysTypes.h>

// We have compiler support for the newest of the new, but
// MSVC doesn't tell us that.
Expand Down
2 changes: 1 addition & 1 deletion folly/executors/ExecutorWithPriority-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ExecutorWithPriorityImpl : public virtual Executor {
ExecutorWithPriorityImpl(
Executor::KeepAlive<Executor> executor, Callback&& callback)
: executor_(std::move(executor)), callback_(std::move(callback)) {}
std::atomic<ssize_t> keepAliveCounter_{1};
std::atomic<int64_t> keepAliveCounter_{1};
Executor::KeepAlive<Executor> executor_;
Callback callback_;
};
Expand Down
1 change: 1 addition & 0 deletions folly/experimental/JemallocHugePageAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <folly/portability/Malloc.h>
#include <folly/portability/String.h>
#include <folly/portability/SysMman.h>
#include <folly/portability/SysTypes.h>

#include <glog/logging.h>

Expand Down
2 changes: 1 addition & 1 deletion folly/logging/LogName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ StringPiece LogName::getParent(StringPiece name) {
return name;
}

ssize_t idx = name.size();
size_t idx = name.size();

// Skip over any trailing separator characters
while (idx > 0 && isSeparator(name[idx - 1])) {
Expand Down
1 change: 1 addition & 0 deletions folly/system/AtFork.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <mutex>

#include <folly/Function.h>
#include <folly/portability/SysTypes.h>

namespace folly {

Expand Down

0 comments on commit d969a5c

Please sign in to comment.