]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/lib/isc/win32/include/isc/stat.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / lib / isc / win32 / include / isc / stat.h
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_IEXEC _S_IEXEC        /* execute/search permission, owner */
33 #define S_IRUSR _S_IREAD        /* Owner read permission */
34 #define S_IWUSR _S_IWRITE       /* Owner write permission */
35 #define S_IRGRP _S_IREAD        /* Group read permission */
36 #define S_IWGRP _S_IWRITE       /* Group write permission */
37 #define S_IROTH _S_IREAD        /* Other read permission */
38 #define S_IWOTH _S_IWRITE       /* Other write permission */
39
40 #ifndef S_IFMT
41 # define S_IFMT   _S_IFMT
42 #endif
43 #ifndef S_IFDIR
44 # define S_IFDIR  _S_IFDIR
45 #endif
46 #ifndef S_IFCHR
47 # define S_IFCHR  _S_IFCHR
48 #endif
49 #ifndef S_IFREG
50 # define S_IFREG  _S_IFREG
51 #endif
52
53 #ifndef S_ISDIR
54 # define S_ISDIR(m)     (((m) & S_IFMT) == S_IFDIR)
55 #endif
56 #ifndef S_ISREG
57 # define S_ISREG(m)     (((m) & S_IFMT) == S_IFREG)
58 #endif
59
60 #define O_RDONLY _O_RDONLY
61 #define O_WRONLY _O_WRONLY
62 #define O_RDWR _O_RDWR
63 #define O_APPEND _O_APPEND
64 #define O_CREAT _O_CREAT
65 #define O_TRUNC _O_TRUNC
66 #define O_EXCL _O_EXCL
67
68 #endif /* ISC_STAT_H */