/*
* POSIX says use <fnct.h> to get O_* symbols and
* SEEK_SET symbol form <unistd.h>.
*/
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <stdio.h>
#ifdef HAVE_SYS_FILE_H
# include <sys/file.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#if !defined(SEEK_SET) && defined(L_SET)
# define SEEK_SET L_SET
#endif
#ifdef SYS_WINNT
# include <io.h>
# include "win32_io.h"
#endif
#include <isc/boolean.h>
#include <isc/netaddr.h>
#if defined(HAVE_NETINET_IN_H) && defined(HAVE_NETINET_IP_H)
# include <netinet/in.h>
# ifdef HAVE_NETINET_IN_SYSTM_H
# include <netinet/in_systm.h>
# endif
# include <netinet/ip.h>
#endif
#include "libntp.h" /* This needs Something above for GETDTABLESIZE */
#include "ntp_keyacc.h"
/*
* Define FNDELAY and FASYNC using O_NONBLOCK and O_ASYNC if we need
* to (and can). This is here initially for QNX, but may help for
* others as well...
*/
#ifndef FNDELAY
# ifdef O_NONBLOCK
# define FNDELAY O_NONBLOCK
# endif
#endif