Commit 2ebe56c4 authored by Kenton Varda's avatar Kenton Varda

Don't compile async-unix on Windows.

I prefer #ifdefing out the whole file rather than adjusting every build system.
parent 16bfab40
......@@ -19,6 +19,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if !_WIN32
#include "async-unix.h"
#include "thread.h"
#include "debug.h"
......@@ -34,6 +36,7 @@
#include <algorithm>
namespace kj {
namespace {
inline void delay() { usleep(10000); }
......@@ -585,4 +588,7 @@ TEST(AsyncUnixTest, Wake) {
EXPECT_TRUE(port.wait());
}
} // namespace
} // namespace kj
#endif // !_WIN32
......@@ -19,6 +19,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if !_WIN32
#include "async-unix.h"
#include "debug.h"
#include "threadlocal.h"
......@@ -872,3 +874,5 @@ void UnixEventPort::wake() const {
#endif // KJ_USE_EPOLL, else
} // namespace kj
#endif // !_WIN32
......@@ -22,6 +22,10 @@
#ifndef KJ_ASYNC_UNIX_H_
#define KJ_ASYNC_UNIX_H_
#if _WIN32
#error "This file is Unix-specific. On Windows, include async-win32.h instead."
#endif
#if defined(__GNUC__) && !KJ_HEADER_WARNINGS
#pragma GCC system_header
#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