diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-11-19 08:52:33 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-11-19 08:52:33 +0000 |
commit | 1a05a90f1ce86394d7966aaaa9539adaa228c6bf (patch) | |
tree | 2b9cafe58b4fa7bf01d1b58a23bc5e66157d3279 /lib/select.h | |
parent | dcea109bb5ce1c8afeb0510945eb15e86cfcf1dc (diff) | |
download | curl-1a05a90f1ce86394d7966aaaa9539adaa228c6bf.tar.gz |
David Phillips' FD_SETSIZE fix
Diffstat (limited to 'lib/select.h')
-rw-r--r-- | lib/select.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/select.h b/lib/select.h new file mode 100644 index 000000000..373ba2164 --- /dev/null +++ b/lib/select.h @@ -0,0 +1,57 @@ +#ifndef __SELECT_H +#define __SELECT_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + + +#ifdef HAVE_SYS_POLL_H +#include <sys/poll.h> +#else + +#define POLLIN 0x01 +#define POLLPRI 0x02 +#define POLLOUT 0x04 +#define POLLERR 0x08 +#define POLLHUP 0x10 +#define POLLNVAL 0x20 + +struct pollfd +{ + int fd; + short events; + short revents; +}; + +#endif + + +#define CSELECT_IN 0x01 +#define CSELECT_OUT 0x02 +#define CSELECT_ERR 0x04 + +int Curl_select(int readfd, int writefd, int timeout_ms); + +int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); + + +#endif |