1
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2005, 2007 |
|
4 John W. Eaton |
1
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
1
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
1
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_statdefs_h) |
|
25 #define octave_statdefs_h 1 |
1
|
26 |
2443
|
27 #ifdef HAVE_SYS_TYPES_H |
1
|
28 #include <sys/types.h> |
2443
|
29 #endif |
2926
|
30 |
|
31 #ifdef HAVE_SYS_STAT_H |
1
|
32 #include <sys/stat.h> |
2926
|
33 #endif |
1
|
34 |
|
35 #ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */ |
3225
|
36 #ifndef mode_t |
1
|
37 #define mode_t unsigned short |
|
38 #endif |
3225
|
39 #endif |
1
|
40 #if !defined(S_ISBLK) && defined(S_IFBLK) |
|
41 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) |
|
42 #endif |
|
43 #if !defined(S_ISCHR) && defined(S_IFCHR) |
|
44 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) |
|
45 #endif |
|
46 #if !defined(S_ISDIR) && defined(S_IFDIR) |
|
47 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
|
48 #endif |
|
49 #if !defined(S_ISREG) && defined(S_IFREG) |
|
50 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
|
51 #endif |
|
52 #if !defined(S_ISFIFO) && defined(S_IFIFO) |
|
53 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) |
|
54 #endif |
|
55 #if !defined(S_ISLNK) && defined(S_IFLNK) |
|
56 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) |
|
57 #endif |
|
58 #if !defined(S_ISSOCK) && defined(S_IFSOCK) |
|
59 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) |
|
60 #endif |
|
61 #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ |
|
62 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) |
|
63 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) |
|
64 #endif |
|
65 #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ |
|
66 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) |
|
67 #endif |
|
68 |
|
69 #ifndef S_ISLNK |
4062
|
70 #undef HAVE_LSTAT |
1
|
71 #endif |
|
72 |
|
73 #endif |
|
74 |
|
75 /* |
|
76 ;;; Local Variables: *** |
1164
|
77 ;;; mode: C *** |
1
|
78 ;;; End: *** |
|
79 */ |