X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fpollable.cpp;h=4b0cb1c7bb3804e3aeef109a27405ae0ceac57c8;hp=805521d7e2383a77025547707c510a3278a81844;hb=a883560b42163f5ed0c83204469d17dd4f0134b6;hpb=1013e3c216cdf8e0ecc0f3b1e8314989b5333818 diff --git a/source/pollable.cpp b/source/pollable.cpp index 805521d..4b0cb1c 100644 --- a/source/pollable.cpp +++ b/source/pollable.cpp @@ -3,18 +3,28 @@ This file is part of libmspframework Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ +#ifdef WIN32 +#include +#include "win32poll.h" +#else #include +#endif #include "pollable.h" namespace Msp { short Pollable::poll(short events, int timeout) { +#ifdef WIN32 + return 0; +#else pollfd pfd={get_fd(), events, 0}; + int result=select(&pfd, 1, timeout); int result=::poll(&pfd, 1, timeout); if(result<=0) return result; return pfd.revents; +#endif } }