1/* 2 * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") 3 * Copyright (C) 2000, 2001, 2003 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: stat.h,v 1.9 2009/10/01 23:48:08 tbox Exp $ */ 19 20#ifndef ISC_STAT_H 21#define ISC_STAT_H 1 22 23#include <sys/stat.h> 24 25/* open() under unix allows setting of read/write permissions 26 * at the owner, group and other levels. These don't exist in NT 27 * We'll just map them all to the NT equivalent 28 */ 29 30#define S_IREAD _S_IREAD /* read permission, owner */ 31#define S_IWRITE _S_IWRITE /* write permission, owner */ 32#define S_IRUSR _S_IREAD /* Owner read permission */ 33#define S_IWUSR _S_IWRITE /* Owner write permission */ 34#define S_IRGRP _S_IREAD /* Group read permission */ 35#define S_IWGRP _S_IWRITE /* Group write permission */ 36#define S_IROTH _S_IREAD /* Other read permission */ 37#define S_IWOTH _S_IWRITE /* Other write permission */ 38 39#ifndef S_IFMT 40# define S_IFMT _S_IFMT 41#endif 42#ifndef S_IFDIR 43# define S_IFDIR _S_IFDIR 44#endif 45#ifndef S_IFCHR 46# define S_IFCHR _S_IFCHR 47#endif 48#ifndef S_IFREG 49# define S_IFREG _S_IFREG 50#endif 51 52#ifndef S_ISDIR 53# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 54#endif 55#ifndef S_ISREG 56# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 57#endif 58 59#endif /* ISC_STAT_H */ 60