diff options
author | David Hill <dhill@conformal.com> | 2013-06-29 21:34:51 (GMT) |
---|---|---|
committer | David Hill <dhill@conformal.com> | 2013-06-29 21:34:51 (GMT) |
commit | 7b9b1fb94aa44784e33734bef68c76e6a43361ef (patch) | |
tree | 760cfc7543c2369880a25e3b897e8fb2ecb46df1 /src | |
parent | c8ac05c871a22cdd3b41ab76e72544524cedafae (diff) | |
download | Ninja-7b9b1fb94aa44784e33734bef68c76e6a43361ef.zip Ninja-7b9b1fb94aa44784e33734bef68c76e6a43361ef.tar.gz Ninja-7b9b1fb94aa44784e33734bef68c76e6a43361ef.tar.bz2 |
support Bitrig
Diffstat (limited to 'src')
-rw-r--r-- | src/subprocess-posix.cc | 6 | ||||
-rw-r--r-- | src/subprocess_test.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/subprocess-posix.cc b/src/subprocess-posix.cc index b396f84..ae010c9 100644 --- a/src/subprocess-posix.cc +++ b/src/subprocess-posix.cc @@ -41,7 +41,7 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) { Fatal("pipe: %s", strerror(errno)); fd_ = output_pipe[0]; #if !defined(USE_PPOLL) - // On Linux and OpenBSD, we use ppoll in DoWork(); elsewhere we use pselect + // On Linux, OpenBSD and Bitrig, we use ppoll in DoWork(); elsewhere we use pselect // and so must avoid overly-large FDs. if (fd_ >= static_cast<int>(FD_SETSIZE)) Fatal("pipe: %s", strerror(EMFILE)); @@ -224,7 +224,7 @@ bool SubprocessSet::DoWork() { return interrupted_; } -#else // linux || __OpenBSD__ +#else // linux || __OpenBSD__ || __Bitrig__ bool SubprocessSet::DoWork() { fd_set set; int nfds = 0; @@ -266,7 +266,7 @@ bool SubprocessSet::DoWork() { return interrupted_; } -#endif // linux || __OpenBSD__ +#endif // linux || __OpenBSD__ || __Bitrig__ Subprocess* SubprocessSet::NextFinished() { if (finished_.empty()) diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc index afd9008..7e98cad 100644 --- a/src/subprocess_test.cc +++ b/src/subprocess_test.cc @@ -152,7 +152,7 @@ TEST_F(SubprocessTest, SetWithMulti) { // OS X's process limit is less than 1025 by default // (|sysctl kern.maxprocperuid| is 709 on 10.7 and 10.8 and less prior to that). -#if defined(linux) || defined(__OpenBSD__) +#if defined(linux) || defined(__OpenBSD__) || defined(__Bitrig__) TEST_F(SubprocessTest, SetWithLots) { // Arbitrary big number; needs to be over 1024 to confirm we're no longer // hostage to pselect. @@ -179,7 +179,7 @@ TEST_F(SubprocessTest, SetWithLots) { } ASSERT_EQ(kNumProcs, subprocs_.finished_.size()); } -#endif // linux || __OpenBSD__ +#endif // linux || __OpenBSD__ || __Bitrig__ // TODO: this test could work on Windows, just not sure how to simply // read stdin. |