Upgrade GDB from 7.4.1 to 7.6.1 on the vendor branch
[dragonfly.git] / contrib / gdb-7 / gdb / common / gdb_stat.h
1 /* Portable <sys/stat.h>
2    Copyright (C) 1995-2013 Free Software Foundation, Inc.
3
4    This file is part of GDB.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program 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
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18
19 #if !defined(GDB_STAT_H)
20 #define GDB_STAT_H
21
22 #include <sys/types.h>
23 #include <sys/stat.h>
24
25 #if !defined(S_ISBLK) && defined(S_IFBLK)
26 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
27 #endif
28 #if !defined(S_ISCHR) && defined(S_IFCHR)
29 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
30 #endif
31 #if !defined(S_ISDIR) && defined(S_IFDIR)
32 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
33 #endif
34 #if !defined(S_ISREG) && defined(S_IFREG)
35 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
36 #endif
37 #if !defined(S_ISFIFO) && defined(S_IFIFO)
38 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
39 #endif
40 #if !defined(S_ISLNK) && defined(S_IFLNK)
41 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
42 #endif
43 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
44 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
45 #endif
46 #if !defined(S_ISMPB) && defined(S_IFMPB)       /* V7 */
47 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
48 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
49 #endif
50 #if !defined(S_ISNWK) && defined(S_IFNWK)       /* HP/UX */
51 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
52 #endif
53
54 /* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
55 #ifndef S_IROTH
56 #define S_IROTH S_IREAD
57 #endif
58
59 #endif /* !defined(GDB_STAT_H) */