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