xref: /minix/external/bsd/bind/dist/lib/isc/win32/unistd.h (revision 00b67f09)
1 /*	$NetBSD: unistd.h,v 1.4 2014/12/10 04:38:01 christos Exp $	*/
2 
3 /*
4  * Copyright (C) 2004, 2007-2009  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.10 2009/07/17 23:47:41 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 #ifndef F_OK
45 #define	F_OK	0
46 #endif
47 
48 #ifndef X_OK
49 #define	X_OK	1
50 #endif
51 
52 #ifndef W_OK
53 #define W_OK 2
54 #endif
55 
56 #ifndef R_OK
57 #define R_OK 4
58 #endif
59 
60 #define access _access
61 
62 #include <process.h>
63