~ubuntu-branches/ubuntu/intrepid/curl/intrepid

« back to all changes in this revision

Viewing changes to lib/select.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-05-16 15:16:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070516151654-jo48r81zempo1qav
Tags: 7.16.2-3ubuntu1
* Merge with Debian; remaining changes:
  - Drop the stunnel build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 *                            | (__| |_| |  _ <| |___
8
8
 *                             \___|\___/|_| \_\_____|
9
9
 *
10
 
 * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
 
10
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
11
11
 *
12
12
 * This software is licensed as described in the file COPYING, which
13
13
 * you should have received as part of this distribution. The terms
20
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
21
 * KIND, either express or implied.
22
22
 *
23
 
 * $Id: select.h,v 1.4 2006-04-07 21:50:47 bagder Exp $
 
23
 * $Id: select.h,v 1.10 2007-03-27 18:15:26 yangtse Exp $
24
24
 ***************************************************************************/
25
25
 
 
26
#include "setup.h"
 
27
 
26
28
#ifdef HAVE_SYS_POLL_H
27
29
#include <sys/poll.h>
28
 
#else
 
30
#endif
 
31
 
 
32
/*
 
33
 * poll() function on Windows Vista and later is called WSAPoll()
 
34
 */
 
35
 
 
36
#if defined(USE_WINSOCK) && (USE_WINSOCK > 1) && \
 
37
    defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
 
38
#undef  HAVE_POLL
 
39
#define HAVE_POLL 1
 
40
#undef  HAVE_POLL_FINE
 
41
#define HAVE_POLL_FINE 1
 
42
#define poll(x,y,z) WSAPoll((x),(y),(z))
 
43
#endif
 
44
 
 
45
/*
 
46
 * Definition of pollfd struct and constants for platforms lacking them.
 
47
 */
 
48
 
 
49
#ifndef HAVE_POLL
29
50
 
30
51
#define POLLIN      0x01
31
52
#define POLLPRI     0x02
43
64
 
44
65
#endif
45
66
 
 
67
#ifndef POLLRDNORM
 
68
#define POLLRDNORM POLLIN
 
69
#endif
 
70
 
 
71
#ifndef POLLWRNORM
 
72
#define POLLWRNORM POLLOUT
 
73
#endif
 
74
 
 
75
#ifndef POLLRDBAND
 
76
#define POLLRDBAND POLLPRI
 
77
#endif
 
78
 
46
79
#define CSELECT_IN   0x01
47
80
#define CSELECT_OUT  0x02
48
81
#define CSELECT_ERR  0x04
49
82
 
50
 
int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms);
 
83
int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms);
51
84
 
52
85
int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
53
86
 
 
87
int Curl_select(int nfds,
 
88
                fd_set *fds_read, fd_set *fds_write, fd_set *fds_excep,
 
89
                struct timeval *timeout);
 
90
 
54
91
#ifdef TPF
55
92
int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
56
93
                       fd_set* excepts, struct timeval* tv);
57
94
#endif
58
95
 
59
 
#endif
 
96
#endif /* __SELECT_H */