dvitomp fix from Akira
[mplib] / src / texk / kpathsea / c-stat.h
1 /* c-stat.h: declarations for using stat(2).
2
3    Copyright 1993, 1996, 2008 Karl Berry.
4    Copyright 1998, 2000, 2005 Olaf Weber.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public License
17    along with this library; if not, see <http://www.gnu.org/licenses/>.  */
18
19 #ifndef KPATHSEA_STAT_H
20 #define KPATHSEA_STAT_H
21
22 #include <kpathsea/systypes.h>
23 #include <sys/stat.h>
24
25 #ifdef WIN32
26 #include <oldnames.h>
27 #endif /* WIN32 */
28
29 /* POSIX predicates for testing file attributes.  */
30
31 #if !defined (S_ISBLK) && defined (S_IFBLK)
32 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
33 #endif
34 #if !defined (S_ISCHR) && defined (S_IFCHR)
35 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
36 #endif
37 #if !defined (S_ISDIR) && defined (S_IFDIR)
38 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
39 #endif
40 #if !defined (S_ISREG) && defined (S_IFREG)
41 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
42 #endif
43 #if !defined (S_ISFIFO) && defined (S_IFIFO)
44 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
45 #endif
46 #if !defined (S_ISLNK) && defined (S_IFLNK)
47 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
48 #endif
49 #if !defined (S_ISSOCK) && defined (S_IFSOCK)
50 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
51 #endif
52 #if !defined (S_ISMPB) && defined (S_IFMPB) /* V7 */
53 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
54 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
55 #endif
56 #if !defined (S_ISNWK) && defined (S_IFNWK) /* HP/UX */
57 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
58 #endif
59
60 #endif /* not KPATHSEA_STAT_H */