xref: /netbsd/external/bsd/ntp/dist/lib/isc/win32/unistd.h (revision 6550d01e)
1 /*	$NetBSD: unistd.h,v 1.1.1.1 2009/12/13 16:54:41 kardel Exp $	*/
2 
3 /*
4  * Copyright (C) 2004, 2007, 2008  Internet Systems Consortium, Inc. ("ISC")
5  * Copyright (C) 2000, 2001  Internet Software Consortium.
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /* Id: unistd.h,v 1.8 2008/01/23 03:22:43 tbox Exp */
21 
22 /* None of these are defined in NT, so define them for our use */
23 #define O_NONBLOCK 1
24 #define PORT_NONBLOCK O_NONBLOCK
25 
26 /*
27  * fcntl() commands
28  */
29 #define F_SETFL 0
30 #define F_GETFL 1
31 #define F_SETFD 2
32 #define F_GETFD 3
33 /*
34  * Enough problems not having full fcntl() without worrying about this!
35  */
36 #undef F_DUPFD
37 
38 int fcntl(int, int, ...);
39 
40 /*
41  * access() related definitions for winXP
42  */
43 #include <io.h>
44 
45 #ifndef W_OK
46 #define W_OK 2
47 #endif
48 
49 #ifndef R_OK
50 #define R_OK 4
51 #endif
52 
53 #define access _access
54 
55 #include <process.h>
56