/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* */ #ifndef ←←XR←sys←stat←h #define ←←XR←sys←stat←h #include <config/PCR←OS.h> #include <sys/stat.h> #include <xr/XR←sys←types.h> struct XR←stat { XR←dev←t st←dev; XR←ino←t st←ino; XR←mode←t st←mode; short st←nlink; XR←uid←t st←uid; XR←gid←t st←gid; XR←dev←t st←rdev; XR←off←t st←size; XR←time←t st←atime; int st←spare1; XR←time←t st←mtime; int st←spare2; XR←time←t st←ctime; int st←spare3; long st←blksize; long st←blocks; long st←spare4[2]; }; #define XR←S←ISUID 0004000 /* set user id on execution */ #define XR←S←ISGID 0002000 /* set group id on execution */ #define XR←S←ISVTX 0001000 /* save swapped text even after use */ #define XR←S←IFMT 0170000 #define XR←S←IFDIR 0040000 /* directory */ #define XR←S←IFCHR 0020000 /* character special */ #define XR←S←IFBLK 0060000 /* block special */ #define XR←S←IFREG 0100000 /* regular */ #define XR←S←IFLNK 0120000 /* symbolic link */ #define XR←S←IFSOCK 0140000 /* socket */ #define XR←S←IFIFO 0010000 /* fifo */ #define XR←S←IRWXU 0000700 /* rwx, owner */ #define XR←S←IRUSR 0000400 /* read permission, owner */ #define XR←S←IWUSR 0000200 /* write permission, owner */ #define XR←S←IXUSR 0000100 /* execute/search permission, owner */ #define XR←S←IRWXG 0000070 /* rwx, group */ #define XR←S←IRGRP 0000040 /* read permission, group */ #define XR←S←IWGRP 0000020 /* write permission, grougroup */ #define XR←S←IXGRP 0000010 /* execute/search permission, group */ #define XR←S←IRWXO 0000007 /* rwx, other */ #define XR←S←IROTH 0000004 /* read permission, other */ #define XR←S←IWOTH 0000002 /* write permission, other */ #define XR←S←IXOTH 0000001 /* execute/search permission, other */ #if defined(PCR←OS←SUNOS4) #define XR←sys←stat←ModeToHost(m) (m) /* cheat */ #define XR←sys←stat←ModeFromHost(m) (m) /* cheat */ extern void XR←sys←stat←StatFromHost(struct XR←stat *xs, struct stat *s); extern void XR←sys←stat←StatFromPCR(struct XR←stat *xs, struct PCR←stat *ps); #elif defined(PCR←OS←SUNOS5) #define XR←sys←stat←ModeToHost(m) (m) /* cheat */ #define XR←sys←stat←ModeFromHost(m) (m) /* cheat */ extern void XR←sys←stat←StatFromHost(struct XR←stat *xs, struct stat *s); extern void XR←sys←stat←StatFromPCR(struct XR←stat *xs, struct PCR←stat *ps); #else # error os #endif #endif /* !←←XR←sys←stat←h */