xref: /freebsd/contrib/ntp/include/libntp.h (revision 416ba5c74546f32a993436a99516d35008e9f384)
1*2b15cb3dSCy Schubert /* libntp.h */
2*2b15cb3dSCy Schubert 
3*2b15cb3dSCy Schubert #if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
4*2b15cb3dSCy Schubert #define GETDTABLESIZE()	((int)sysconf(_SC_OPEN_MAX))
5*2b15cb3dSCy Schubert #elif defined(HAVE_GETDTABLESIZE)
6*2b15cb3dSCy Schubert #define GETDTABLESIZE	getdtablesize
7*2b15cb3dSCy Schubert #else
8*2b15cb3dSCy Schubert /*
9*2b15cb3dSCy Schubert  * if we have no idea about the max fd value set up things
10*2b15cb3dSCy Schubert  * so we will start at FOPEN_MAX
11*2b15cb3dSCy Schubert  */
12*2b15cb3dSCy Schubert #define GETDTABLESIZE()	(FOPEN_MAX + FD_CHUNK)
13*2b15cb3dSCy Schubert #endif
14*2b15cb3dSCy Schubert 
15*2b15cb3dSCy Schubert extern void	make_socket_nonblocking( SOCKET fd );
16*2b15cb3dSCy Schubert extern SOCKET	move_fd( SOCKET fd );
17