-#include <errno.h>
+#include <cerrno>
#include <stdexcept>
#include <msp/core/systemerror.h>
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
#include <msp/time/units.h>
#include "base.h"
#include "poll.h"
PollEvent result = P_NONE;
#ifdef WIN32
- // Stop the compiler from complaining about unused parameter
- event = event;
+ (void)event;
#else
if(event&POLLIN)
result = result|P_INPUT;
return P_NONE;
#else
- pollfd pfd = {obj.get_event_handle(), sys_poll_event(pe), 0};
+ pollfd pfd = { obj.get_event_handle(), sys_poll_event(pe), 0 };
int ret = ::poll(&pfd, 1, timeout);
if(ret==-1)
}
+
namespace Msp {
namespace IO {
bool pfd_dirty;
SlotSeq poll_result;
- void rebuild_pfd();
- int do_poll(int);
-
public:
Poller();
void set_object(Base &, PollEvent);
int poll();
int poll(const Time::TimeDelta &);
+private:
+ void rebuild_pfd();
+ int do_poll(int);
+public:
const SlotSeq &get_result() const { return poll_result; }
};
#include <fcntl.h>
#include <errno.h>
#endif
+#include <msp/strings/format.h>
#include <msp/core/systemerror.h>
-#include <msp/strings/formatter.h>
#include "serial.h"
using namespace std;