fakepoll.h 542 B

12345678910111213141516171819202122232425262728293031
  1. /* Copyright 2002,2003 Nick Mathewson, Roger Dingledine. */
  2. /* See LICENSE for licensing information */
  3. /* $Id$ */
  4. #ifndef __FAKEPOLL_H
  5. #define __FAKEPOLL_H
  6. #include "orconfig.h"
  7. #ifndef HAVE_POLL_H
  8. #ifndef HAVE_SYS_POLL_H
  9. #define USE_FAKE_POLL
  10. struct pollfd {
  11. int fd;
  12. short events;
  13. short revents;
  14. };
  15. #define POLLIN 0x0001
  16. #define POLLPRI 0x0002
  17. #define POLLOUT 0x0004
  18. #define POLLERR 0x0008
  19. #define POLLHUP 0x0010
  20. #define POLLNVAL 0x0020
  21. int poll(struct pollfd *ufds, unsigned int nfds, int timeout);
  22. #endif
  23. #endif
  24. #endif