Back to index

tetex-bin  3.0
c-stat.h
Go to the documentation of this file.
00001 /* c-stat.h: declarations for using stat(2).
00002 
00003 Copyright (C) 1993, 96, 2000 Free Software Foundation, Inc.
00004 
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Library General Public
00007 License as published by the Free Software Foundation; either
00008 version 2 of the License, or (at your option) any later version.
00009 
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 Library General Public License for more details.
00014 
00015 You should have received a copy of the GNU Library General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00018 
00019 #ifndef KPATHSEA_STAT_H
00020 #define KPATHSEA_STAT_H
00021 
00022 #include <kpathsea/systypes.h>
00023 #include <sys/stat.h>
00024 
00025 #ifdef WIN32
00026 #include <oldnames.h>
00027 #endif /* WIN32 */
00028 
00029 /* POSIX predicates for testing file attributes.  */
00030 
00031 #if !defined (S_ISBLK) && defined (S_IFBLK)
00032 #define       S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
00033 #endif
00034 #if !defined (S_ISCHR) && defined (S_IFCHR)
00035 #define       S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
00036 #endif
00037 #if !defined (S_ISDIR) && defined (S_IFDIR)
00038 #define       S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00039 #endif
00040 #if !defined (S_ISREG) && defined (S_IFREG)
00041 #define       S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
00042 #endif
00043 #if !defined (S_ISFIFO) && defined (S_IFIFO)
00044 #define       S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
00045 #endif
00046 #if !defined (S_ISLNK) && defined (S_IFLNK)
00047 #define       S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
00048 #endif
00049 #if !defined (S_ISSOCK) && defined (S_IFSOCK)
00050 #define       S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
00051 #endif
00052 #if !defined (S_ISMPB) && defined (S_IFMPB) /* V7 */
00053 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
00054 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
00055 #endif
00056 #if !defined (S_ISNWK) && defined (S_IFNWK) /* HP/UX */
00057 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
00058 #endif
00059 
00060 #endif /* not KPATHSEA_STAT_H */