]> git.tdb.fi Git - libs/core.git/blobdiff - source/win32poll.h
Win32 tweaks
[libs/core.git] / source / win32poll.h
diff --git a/source/win32poll.h b/source/win32poll.h
new file mode 100644 (file)
index 0000000..f39d53e
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+This file is part of libmspframework
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+#ifndef MSP_FRAMEWORK_WIN32POLL_H_
+#define MSP_FRAMEWORK_WIN32POLL_H_
+
+#ifdef WIN32
+// From Linux sys/poll.h
+struct pollfd
+{
+       int fd;                 /* File descriptor to poll.  */
+       short int events;       /* Types of events poller cares about.  */
+       short int revents;      /* Types of events that actually occurred.  */
+};
+
+#ifndef POLLIN
+// From Linux pth.h
+#define POLLIN         0x0001  /* any readable data available   */
+#endif
+
+#ifndef POLLNVAL
+// From Linux pth.h
+#define POLLNVAL       0x0020  /* requested events "invalid"    */
+#endif
+
+#endif // Win32
+#endif