1N/A/***********************************************************************
1N/A* *
1N/A* This software is part of the ast package *
1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property *
1N/A* and is licensed under the *
1N/A* Common Public License, Version 1.0 *
1N/A* by AT&T Intellectual Property *
1N/A* *
1N/A* A copy of the License is available at *
1N/A* http://www.opensource.org/licenses/cpl1.0.txt *
1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1N/A* *
1N/A* Information and Software Systems Research *
1N/A* AT&T Research *
1N/A* Florham Park NJ *
1N/A* *
1N/A* Glenn Fowler <gsf@research.att.com> *
1N/A* David Korn <dgk@research.att.com> *
1N/A* Phong Vo <kpv@research.att.com> *
1N/A* *
1N/A***********************************************************************/
1N/A#pragma prototyped
1N/A/*
1N/A * Glenn Fowler
1N/A * AT&T Research
1N/A *
1N/A * canonical mode_t representation
1N/A */
1N/A
1N/A#ifndef _MODECANON_H
1N/A#define _MODECANON_H
1N/A
1N/A#define X_ITYPE(m) ((m)&X_IFMT)
1N/A
1N/A#define X_IFMT 0170000
1N/A#define X_IFWHT 0160000
1N/A#define X_IFDOOR 0150000
1N/A#define X_IFSOCK 0140000
1N/A#define X_IFLNK 0120000
1N/A#define X_IFCTG 0110000
1N/A#define X_IFREG 0100000
1N/A#define X_IFBLK 0060000
1N/A#define X_IFDIR 0040000
1N/A#define X_IFCHR 0020000
1N/A#define X_IFIFO 0010000
1N/A
1N/A#define X_IPERM 0007777
1N/A#define X_ISUID 0004000
1N/A#define X_ISGID 0002000
1N/A#define X_ISVTX 0001000
1N/A#define X_IRUSR 0000400
1N/A#define X_IWUSR 0000200
1N/A#define X_IXUSR 0000100
1N/A#define X_IRGRP 0000040
1N/A#define X_IWGRP 0000020
1N/A#define X_IXGRP 0000010
1N/A#define X_IROTH 0000004
1N/A#define X_IWOTH 0000002
1N/A#define X_IXOTH 0000001
1N/A
1N/A#define X_IRWXU (X_IRUSR|X_IWUSR|X_IXUSR)
1N/A#define X_IRWXG (X_IRGRP|X_IWGRP|X_IXGRP)
1N/A#define X_IRWXO (X_IROTH|X_IWOTH|X_IXOTH)
1N/A
1N/A#endif