freebsd-dev/usr.sbin/xntpd/include/ntp_select.h

21 lines
591 B
C
Raw Normal View History

1993-12-21 18:36:48 +00:00
/*
* Not all machines define FD_SET in sys/types.h
1995-05-30 03:57:47 +00:00
*/
1993-12-21 18:36:48 +00:00
#ifndef _ntp_select_h
#define _ntp_select_h
#if (defined(RS6000)||defined(SYS_PTX))&&!defined(_BSD)
#include <sys/select.h>
#endif
#ifndef FD_SET
#define NFDBITS 32
#define FD_SETSIZE 32
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
1994-02-03 22:09:07 +00:00
#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
1993-12-21 18:36:48 +00:00
#endif
#endif /* _ntp_select_h */