|
Last change
on this file was 18, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
991 bytes
|
| Line | |
|---|
| 1 | /* sys/select.h (emx+gcc) */
|
|---|
| 2 |
|
|---|
| 3 | #ifndef _SYS_SELECT_H
|
|---|
| 4 | #define _SYS_SELECT_H
|
|---|
| 5 |
|
|---|
| 6 | #if defined (__cplusplus)
|
|---|
| 7 | extern "C" {
|
|---|
| 8 | #endif
|
|---|
| 9 |
|
|---|
| 10 | #if !defined (FD_SETSIZE)
|
|---|
| 11 | #define FD_SETSIZE 256
|
|---|
| 12 | #elif FD_SETSIZE < 256
|
|---|
| 13 | #error FD_SETSIZE must be at least 256
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | #if !defined (_FD_SET_T)
|
|---|
| 17 | #define _FD_SET_T
|
|---|
| 18 |
|
|---|
| 19 | typedef struct _fd_set
|
|---|
| 20 | {
|
|---|
| 21 | unsigned long fds_bits[(FD_SETSIZE+31) / 32];
|
|---|
| 22 | } fd_set;
|
|---|
| 23 |
|
|---|
| 24 | #endif
|
|---|
| 25 |
|
|---|
| 26 | #define FD_SET(n,s) ((s)->fds_bits[(n)/32] |= (1L << ((n) & 0x1f)))
|
|---|
| 27 | #define FD_CLR(n,s) ((s)->fds_bits[(n)/32] &= ~(1L << ((n) & 0x1f)))
|
|---|
| 28 | #define FD_ISSET(n,s) ((s)->fds_bits[(n)/32] & (1L << ((n) & 0x1f)))
|
|---|
| 29 | #define FD_ZERO(s) (void)memset (s, 0, sizeof (*(s)))
|
|---|
| 30 |
|
|---|
| 31 | struct timeval;
|
|---|
| 32 |
|
|---|
| 33 | int select (int, struct _fd_set *, struct _fd_set *, struct _fd_set *,
|
|---|
| 34 | struct timeval *);
|
|---|
| 35 |
|
|---|
| 36 | int _select (int, struct _fd_set *, struct _fd_set *, struct _fd_set *,
|
|---|
| 37 | struct timeval *);
|
|---|
| 38 |
|
|---|
| 39 | void *memset (void *, int, size_t); /* Used by FD_ZERO */
|
|---|
| 40 |
|
|---|
| 41 | #if defined (__cplusplus)
|
|---|
| 42 | }
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 | #endif /* not _SYS_SELECT_H */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.