Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / ntp_io.h
blob8a6c78681dbe952e2fc46c179cbc5d0b7970db93
1 /* $NetBSD$ */
3 #if !defined _NTP_IO_H
4 #define _NTP_IO_H
5 /*
6 * POSIX says use <fnct.h> to get O_* symbols and
7 * SEEK_SET symbol form <unistd.h>.
8 */
9 #ifdef HAVE_CONFIG_H
10 # include <config.h>
11 #endif
13 #ifdef HAVE_SYS_TYPES_H
14 # include <sys/types.h>
15 #endif
16 #ifdef HAVE_UNISTD_H
17 # include <unistd.h>
18 #endif
19 #include <stdio.h>
20 #ifdef HAVE_SYS_FILE_H
21 # include <sys/file.h>
22 #endif
23 #ifdef HAVE_FCNTL_H
24 # include <fcntl.h>
25 #endif
26 #if !defined(SEEK_SET) && defined(L_SET)
27 # define SEEK_SET L_SET
28 #endif
30 #ifdef SYS_WINNT
31 # include <io.h>
32 # include "win32_io.h"
33 #endif
36 * Define FNDELAY and FASYNC using O_NONBLOCK and O_ASYNC if we need
37 * to (and can). This is here initially for QNX, but may help for
38 * others as well...
40 #ifndef FNDELAY
41 # ifdef O_NONBLOCK
42 # define FNDELAY O_NONBLOCK
43 # endif
44 #endif
46 #ifndef FASYNC
47 # ifdef O_ASYNC
48 # define FASYNC O_ASYNC
49 # endif
50 #endif
52 #endif