1258945Sroberto/* 2280849Scy * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC") 3258945Sroberto * Copyright (C) 2000, 2001 Internet Software Consortium. 4258945Sroberto * 5258945Sroberto * Permission to use, copy, modify, and/or distribute this software for any 6258945Sroberto * purpose with or without fee is hereby granted, provided that the above 7258945Sroberto * copyright notice and this permission notice appear in all copies. 8258945Sroberto * 9258945Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10258945Sroberto * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11258945Sroberto * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12258945Sroberto * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13258945Sroberto * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14258945Sroberto * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15258945Sroberto * PERFORMANCE OF THIS SOFTWARE. 16258945Sroberto */ 17258945Sroberto 18280849Scy/* $Id: unistd.h,v 1.10 2009/07/17 23:47:41 tbox Exp $ */ 19258945Sroberto 20258945Sroberto/* None of these are defined in NT, so define them for our use */ 21258945Sroberto#define O_NONBLOCK 1 22258945Sroberto#define PORT_NONBLOCK O_NONBLOCK 23258945Sroberto 24258945Sroberto/* 25258945Sroberto * fcntl() commands 26258945Sroberto */ 27258945Sroberto#define F_SETFL 0 28258945Sroberto#define F_GETFL 1 29258945Sroberto#define F_SETFD 2 30258945Sroberto#define F_GETFD 3 31258945Sroberto/* 32258945Sroberto * Enough problems not having full fcntl() without worrying about this! 33258945Sroberto */ 34258945Sroberto#undef F_DUPFD 35258945Sroberto 36258945Srobertoint fcntl(int, int, ...); 37258945Sroberto 38258945Sroberto/* 39258945Sroberto * access() related definitions for winXP 40258945Sroberto */ 41258945Sroberto#include <io.h> 42280849Scy#ifndef F_OK 43280849Scy#define F_OK 0 44280849Scy#endif 45258945Sroberto 46280849Scy#ifndef X_OK 47280849Scy#define X_OK 1 48280849Scy#endif 49280849Scy 50258945Sroberto#ifndef W_OK 51258945Sroberto#define W_OK 2 52258945Sroberto#endif 53258945Sroberto 54258945Sroberto#ifndef R_OK 55258945Sroberto#define R_OK 4 56258945Sroberto#endif 57258945Sroberto 58258945Sroberto#define access _access 59258945Sroberto 60258945Sroberto#include <process.h> 61