Annotation of embedaddon/ntp/include/ntp_select.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Not all machines define FD_SET in sys/types.h
3: */
4: #ifndef NTP_SELECT_H
5: #define NTP_SELECT_H
6:
7: /* Was: (defined(RS6000)||defined(SYS_PTX))&&!defined(_BSD) */
8: /* Could say: !defined(FD_SET) && defined(HAVE_SYS_SELECT_H) */
9: #if defined(HAVE_SYS_SELECT_H) && !defined(_BSD)
10: #ifndef SYS_VXWORKS
11: #include <sys/select.h>
12: #else
13: #include <sockLib.h>
14: extern int select (int width, fd_set *pReadFds, fd_set *pWriteFds,
15: fd_set *pExceptFds, struct timeval *pTimeOut);
16:
17: #endif
18: #endif
19:
20: #if !defined(FD_SET)
21: #define NFDBITS 32
22: #define FD_SETSIZE 32
23: #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
24: #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
25: #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
26: #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
27: #endif
28:
29: #if defined(VMS)
30: typedef struct {
31: unsigned int fds_bits[1];
32: } fd_set;
33: #endif
34:
35: #ifdef SYS_WINNT
36: /* ports/winnt/libntp/setpriority.c */
37: extern void InitSockets(void);
38: #endif
39:
40: #endif /* NTP_SELECT_H */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>