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