aboutsummaryrefslogtreecommitdiff
path: root/win32/sys
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-30 12:42:24 +0100
committerRon Yorston <rmy@pobox.com>2012-03-30 12:42:24 +0100
commit4319368c60244268a19f58fd6f1a0b31d3cd4853 (patch)
treea511501ed8bcc73ab24e0c5e5f9280ba713e7495 /win32/sys
parent506360df73c9c9f95f4caf70373673cf55046c9d (diff)
downloadbusybox-w32-4319368c60244268a19f58fd6f1a0b31d3cd4853.tar.gz
busybox-w32-4319368c60244268a19f58fd6f1a0b31d3cd4853.tar.bz2
busybox-w32-4319368c60244268a19f58fd6f1a0b31d3cd4853.zip
Use gnulib poll, importing the version from git
Diffstat (limited to 'win32/sys')
-rw-r--r--win32/sys/poll.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/win32/sys/poll.h b/win32/sys/poll.h
index e69de29bb..b7aa59d97 100644
--- a/win32/sys/poll.h
+++ b/win32/sys/poll.h
@@ -0,0 +1,53 @@
1/* Header for poll(2) emulation
2 Contributed by Paolo Bonzini.
3
4 Copyright 2001, 2002, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
5
6 This file is part of gnulib.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation,
20 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21
22#ifndef _GL_POLL_H
23#define _GL_POLL_H
24
25/* fake a poll(2) environment */
26#define POLLIN 0x0001 /* any readable data available */
27#define POLLPRI 0x0002 /* OOB/Urgent readable data */
28#define POLLOUT 0x0004 /* file descriptor is writeable */
29#define POLLERR 0x0008 /* some poll error occurred */
30#define POLLHUP 0x0010 /* file descriptor was "hung up" */
31#define POLLNVAL 0x0020 /* requested events "invalid" */
32#define POLLRDNORM 0x0040
33#define POLLRDBAND 0x0080
34#define POLLWRNORM 0x0100
35#define POLLWRBAND 0x0200
36
37struct pollfd
38{
39 int fd; /* which file descriptor to poll */
40 short events; /* events we are interested in */
41 short revents; /* events found on return */
42};
43
44typedef unsigned long nfds_t;
45
46extern int poll (struct pollfd *pfd, nfds_t nfd, int timeout);
47
48/* Define INFTIM only if doing so conforms to POSIX. */
49#if !defined (_POSIX_C_SOURCE) && !defined (_XOPEN_SOURCE)
50#define INFTIM (-1)
51#endif
52
53#endif /* _GL_POLL_H */