comparison kpathsea/c-stat.h @ 2999:faa5d0421460

[project @ 1997-05-23 03:02:09 by jwe]
author jwe
date Fri, 23 May 1997 03:02:36 +0000
parents
children 1f0b06020e36
comparison
equal deleted inserted replaced
2998:692ba9d441ec 2999:faa5d0421460
1 /* c-stat.h: declarations for using stat(2).
2
3 Copyright (C) 1993, 96 Free Software Foundation, Inc.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
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 <io.h>
27 #define stat _stat
28 #endif /* WIN32 */
29
30 /* POSIX predicates for testing file attributes. */
31
32 #if !defined (S_ISBLK) && defined (S_IFBLK)
33 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
34 #endif
35 #if !defined (S_ISCHR) && defined (S_IFCHR)
36 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
37 #endif
38 #if !defined (S_ISDIR) && defined (S_IFDIR)
39 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
40 #endif
41 #if !defined (S_ISREG) && defined (S_IFREG)
42 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
43 #endif
44 #if !defined (S_ISFIFO) && defined (S_IFIFO)
45 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
46 #endif
47 #if !defined (S_ISLNK) && defined (S_IFLNK)
48 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
49 #endif
50 #if !defined (S_ISSOCK) && defined (S_IFSOCK)
51 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
52 #endif
53 #if !defined (S_ISMPB) && defined (S_IFMPB) /* V7 */
54 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
55 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
56 #endif
57 #if !defined (S_ISNWK) && defined (S_IFNWK) /* HP/UX */
58 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
59 #endif
60
61 #endif /* not KPATHSEA_STAT_H */