xref: /netbsd-src/external/bsd/ntp/dist/include/libntp.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
1 /*	$NetBSD: libntp.h,v 1.5 2020/05/25 20:47:19 christos Exp $	*/
2 
3 /* libntp.h */
4 
5 #if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
6 #define GETDTABLESIZE()	((int)sysconf(_SC_OPEN_MAX))
7 #elif defined(HAVE_GETDTABLESIZE)
8 #define GETDTABLESIZE	getdtablesize
9 #else
10 /*
11  * if we have no idea about the max fd value set up things
12  * so we will start at FOPEN_MAX
13  */
14 #define GETDTABLESIZE()	(FOPEN_MAX + FD_CHUNK)
15 #endif
16 
17 extern void	make_socket_nonblocking( SOCKET fd );
18 extern SOCKET	move_fd( SOCKET fd );
19