Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / bind / dist / lib / isc / win32 / unistd.h
blob2ab22d87ea16bf1afb111ac06f9d395e42aba16d
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
5 * Copyright (C) 2000, 2001 Internet Software Consortium.
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.
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.
20 /* Id: unistd.h,v 1.10 2009/07/17 23:47:41 tbox Exp */
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
27 * fcntl() commands
29 #define F_SETFL 0
30 #define F_GETFL 1
31 #define F_SETFD 2
32 #define F_GETFD 3
34 * Enough problems not having full fcntl() without worrying about this!
36 #undef F_DUPFD
38 int fcntl(int, int, ...);
41 * access() related definitions for winXP
43 #include <io.h>
44 #ifndef F_OK
45 #define F_OK 0
46 #endif
48 #ifndef X_OK
49 #define X_OK 1
50 #endif
52 #ifndef W_OK
53 #define W_OK 2
54 #endif
56 #ifndef R_OK
57 #define R_OK 4
58 #endif
60 #define access _access
62 #include <process.h>