diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 2618fad5bbb2d0182eb31ed805c41b543c513940 (patch) | |
tree | 52ba93338b13aefd02a0055304a9eccfa0e049f5 /contrib/perl5/ext/IO/poll.h | |
parent | 77644ee620b6a79cf8c538abaf7cd301a875528d (diff) | |
download | FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.zip FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.tar.gz |
Vendor import of Perl 5.006
Diffstat (limited to 'contrib/perl5/ext/IO/poll.h')
-rw-r--r-- | contrib/perl5/ext/IO/poll.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/contrib/perl5/ext/IO/poll.h b/contrib/perl5/ext/IO/poll.h new file mode 100644 index 0000000..4055b49 --- /dev/null +++ b/contrib/perl5/ext/IO/poll.h @@ -0,0 +1,55 @@ +/* + * poll.h + * + * Copyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights reserved. + * This program is free software; you can redistribute it and/or + * modify it under the same terms as Perl itself. + * + */ + +#ifndef POLL_H +# define POLL_H + +#if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND) +# include <poll.h> +#else +#ifdef HAS_SELECT + + +/* We shall emulate poll using select */ + +#define EMULATE_POLL_WITH_SELECT + +typedef struct pollfd { + int fd; + short events; + short revents; +} pollfd_t; + +#define POLLIN 0x0001 +#define POLLPRI 0x0002 +#define POLLOUT 0x0004 +#define POLLRDNORM 0x0040 +#define POLLWRNORM POLLOUT +#define POLLRDBAND 0x0080 +#define POLLWRBAND 0x0100 +#define POLLNORM POLLRDNORM + +/* Return ONLY events (NON testable) */ + +#define POLLERR 0x0008 +#define POLLHUP 0x0010 +#define POLLNVAL 0x0020 + +int poll (struct pollfd *, unsigned long, int); + +#ifndef HAS_POLL +# define HAS_POLL +#endif + +#endif /* HAS_SELECT */ + +#endif /* I_POLL */ + +#endif /* POLL_H */ + |