Back to index

plt-scheme  4.2.1
stat.h
Go to the documentation of this file.
00001 #if HAVE_SYS_TYPES_H
00002 #include <sys/types.h>
00003 #endif
00004 
00005 #if HAVE_SYS_STAT_H
00006 #include <sys/stat.h>
00007 #endif
00008 
00009 #if !S_IRUSR
00010 # if S_IREAD
00011 #  define S_IRUSR S_IREAD
00012 # else
00013 #  define S_IRUSR 00400
00014 # endif
00015 #endif
00016 
00017 #if !S_IWUSR
00018 # if S_IWRITE
00019 #  define S_IWUSR S_IWRITE
00020 # else
00021 #  define S_IWUSR 00200
00022 # endif
00023 #endif
00024 
00025 #if !S_IXUSR
00026 # if S_IEXEC
00027 #  define S_IXUSR S_IEXEC
00028 # else
00029 #  define S_IXUSR 00100
00030 # endif
00031 #endif
00032 
00033 #ifdef STAT_MACROS_BROKEN
00034 # undef S_ISBLK
00035 # undef S_ISCHR
00036 # undef S_ISDIR
00037 # undef S_ISFIFO
00038 # undef S_ISLNK
00039 # undef S_ISMPB
00040 # undef S_ISMPC
00041 # undef S_ISNWK
00042 # undef S_ISREG
00043 # undef S_ISSOCK
00044 #endif
00045 
00046 #if !defined(S_ISBLK) && defined(S_IFBLK)
00047 # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
00048 #endif
00049 #if !defined(S_ISCHR) && defined(S_IFCHR)
00050 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
00051 #endif
00052 #if !defined(S_ISDIR) && defined(S_IFDIR)
00053 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00054 #endif
00055 #if !defined(S_ISREG) && defined(S_IFREG)
00056 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
00057 #endif
00058 #if !defined(S_ISFIFO) && defined(S_IFIFO)
00059 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
00060 #endif
00061 #if !defined(S_ISLNK) && defined(S_IFLNK)
00062 # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
00063 #endif
00064 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
00065 # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
00066 #endif
00067 #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
00068 # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
00069 # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
00070 #endif
00071 #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
00072 # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
00073 #endif