subprocess_test: make SetWithLots run on all non-Windows platforms
authorEvan Martin <martine@danga.com>
Tue, 17 Jul 2012 16:34:10 +0000 (09:34 -0700)
committerEvan Martin <martine@danga.com>
Tue, 17 Jul 2012 23:13:39 +0000 (16:13 -0700)
I think it might have been an oversight that this was marked
Linux-specific.

src/subprocess_test.cc

index 0c10250..7dbaf97 100644 (file)
 
 #include "test.h"
 
-#ifdef linux
-// required by SubprocessTest
+#ifndef _WIN32
+// SetWithLots need setrlimit.
+#include <sys/time.h>
 #include <sys/resource.h>
+#include <unistd.h>
 #endif
 
 namespace {
@@ -147,7 +149,7 @@ TEST_F(SubprocessTest, SetWithMulti) {
   }
 }
 
-#ifdef linux
+#ifndef _WIN32
 TEST_F(SubprocessTest, SetWithLots) {
   // Arbitrary big number; needs to be over 1024 to confirm we're no longer
   // hostage to pselect.
@@ -174,4 +176,4 @@ TEST_F(SubprocessTest, SetWithLots) {
   }
   ASSERT_EQ(kNumProcs, subprocs_.finished_.size());
 }
-#endif  // linux
+#endif  // _WIN32