2 /* : : generated by proto : : */
3 /***********************************************************************
5 * This software is part of the ast package *
6 * Copyright (c) 1985-2010 AT&T Intellectual Property *
7 * and is licensed under the *
8 * Common Public License, Version 1.0 *
9 * by AT&T Intellectual Property *
11 * A copy of the License is available at *
12 * http://www.opensource.org/licenses/cpl1.0.txt *
13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
15 * Information and Software Systems Research *
19 * Glenn Fowler <gsf@research.att.com> *
20 * David Korn <dgk@research.att.com> *
21 * Phong Vo <kpv@research.att.com> *
23 ***********************************************************************/
29 * canonical mode_t representation
33 #if !defined(__PROTO__)
34 #include <prototyped.h>
36 #if !defined(__LINKAGE__)
37 #define __LINKAGE__ /* 2004-08-11 transition */
42 #define X_ITYPE(m) ((m)&X_IFMT)
44 #define X_IFMT 0170000
45 #define X_IFWHT 0160000
46 #define X_IFDOOR 0150000
47 #define X_IFSOCK 0140000
48 #define X_IFLNK 0120000
49 #define X_IFCTG 0110000
50 #define X_IFREG 0100000
51 #define X_IFBLK 0060000
52 #define X_IFDIR 0040000
53 #define X_IFCHR 0020000
54 #define X_IFIFO 0010000
56 #define X_IPERM 0007777
57 #define X_ISUID 0004000
58 #define X_ISGID 0002000
59 #define X_ISVTX 0001000
60 #define X_IRUSR 0000400
61 #define X_IWUSR 0000200
62 #define X_IXUSR 0000100
63 #define X_IRGRP 0000040
64 #define X_IWGRP 0000020
65 #define X_IXGRP 0000010
66 #define X_IROTH 0000004
67 #define X_IWOTH 0000002
68 #define X_IXOTH 0000001
70 #define X_IRWXU (X_IRUSR|X_IWUSR|X_IXUSR)
71 #define X_IRWXG (X_IRGRP|X_IWGRP|X_IXGRP)
72 #define X_IRWXO (X_IROTH|X_IWOTH|X_IXOTH)