source: src/poll_select.h @ b495a1

Revision b495a1, 1.3 KB checked in by Tomash Brechko <tomash.brechko@…>, 4 years ago (diff)

Move can_poll_fd() to header, and make it no-op on Win32.

See added comment describing FD_SETSIZE on Win32.

  • Property mode set to 100644
Line 
1/*
2  Copyright (C) 2008 Tomash Brechko.  All rights reserved.
3
4  When used to build Perl module:
5
6  This library is free software; you can redistribute it and/or modify
7  it under the same terms as Perl itself, either Perl version 5.8.8
8  or, at your option, any later version of Perl 5 you may have
9  available.
10
11  When used as a standalone library:
12
13  This library is free software; you can redistribute it and/or modify
14  it under the terms of the GNU Lesser General Public License as
15  published by the Free Software Foundation; either version 2.1 of the
16  License, or (at your option) any later version.
17
18  This library is distributed in the hope that it will be useful, but
19  WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  Lesser General Public License for more details.
22*/
23
24#ifndef POLL_SELECT_H
25#define POLL_SELECT_H 1
26
27
28#undef  POLLIN
29#define POLLIN   0x1
30#undef  POLLOUT
31#define POLLOUT  0x2
32#undef  POLLERR
33#define POLLERR  0x4
34#undef  POLLHUP
35#define POLLHUP  0x4
36
37
38struct pollfd
39{
40  int fd;                       /* File descriptor.  */
41  short events;                 /* Requested events.  */
42  short revents;                /* Returned events.  */
43};
44
45
46extern
47int
48poll_select(struct pollfd *fds, int nfds, int timeout);
49
50
51#endif  /* ! POLL_SELECT_H */
Note: See TracBrowser for help on using the repository browser.