1 /* $NetBSD: ksh_stat.h,v 1.2 1997/01/12 19:12:00 tls Exp $ */
3 /* Wrapper around the ugly sys/stat includes/ifdefs */
4 /* $NetBSD: ksh_stat.h,v 1.2 1997/01/12 19:12:00 tls Exp $ */
6 /* assumes <sys/types.h> already included */
10 # define lstat(path, buf) stat(path, buf)
11 #endif /* HAVE_LSTAT */
13 #ifdef STAT_MACROS_BROKEN
21 #endif /* STAT_MACROS_BROKEN */
23 #if !defined(S_ISREG) && defined(S_IFREG)
24 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
26 #if !defined(S_ISDIR) && defined(S_IFDIR)
27 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
29 #if !defined(S_ISCHR) && defined(S_IFCHR)
30 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
32 #if !defined(S_ISBLK) && defined(S_IFBLK)
33 # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
35 #if !defined(S_ISFIFO) && defined(S_IFIFO)
36 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
38 #if !defined(S_ISLNK) && defined(S_IFLNK)
39 # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
41 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
42 # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
44 #if !defined(S_ISCDF) && defined(S_CDF)
45 # define S_ISCDF(m) (S_ISDIR(m) && ((m) & S_CDF))
49 # define S_ISVTX 01000 /* sticky bit */
53 # define S_IXUSR 00100 /* user execute bit */
56 # define S_IXGRP 00010 /* user execute bit */
59 # define S_IXOTH 00001 /* user execute bit */