xref: /titanic_41/usr/src/lib/libast/sparc/include/ast/modecanon.h (revision eb82ff87b34e625264561b2d267577cf9821dab0)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *          Copyright (c) 1985-2009 AT&T Intellectual Property          *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                    by AT&T Intellectual Property                     *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * Glenn Fowler
27  * AT&T Research
28  *
29  * canonical mode_t representation
30  */
31 
32 #ifndef _MODECANON_H
33 #if !defined(__PROTO__)
34 #include <prototyped.h>
35 #endif
36 #if !defined(__LINKAGE__)
37 #define __LINKAGE__		/* 2004-08-11 transition */
38 #endif
39 
40 #define _MODECANON_H
41 
42 #define X_ITYPE(m)	((m)&X_IFMT)
43 
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
55 
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
69 
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)
73 
74 #endif
75