Mercurial > hg > octave-lyh
comparison liboctave/statdefs.h @ 1:78fd87e624cb
[project @ 1993-08-08 01:13:40 by jwe]
Initial revision
author | jwe |
---|---|
date | Sun, 08 Aug 1993 01:13:40 +0000 |
parents | |
children | 0b52c68ec81f |
comparison
equal
deleted
inserted
replaced
0:22412e3a4641 | 1:78fd87e624cb |
---|---|
1 // statdefs.h -*- C++ -*- | |
2 /* | |
3 | |
4 Copyright (C) 1992, 1993 John W. Eaton | |
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 | |
10 Free Software Foundation; either version 2, or (at your option) any | |
11 later version. | |
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 | |
19 along with Octave; see the file COPYING. If not, write to the Free | |
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
21 | |
22 */ | |
23 | |
24 #if !defined (_statdefs_h) | |
25 #define _statdefs_h 1 | |
26 | |
27 #include <sys/types.h> | |
28 #include <sys/stat.h> | |
29 | |
30 #ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */ | |
31 #define mode_t unsigned short | |
32 #endif | |
33 #if !defined(S_ISBLK) && defined(S_IFBLK) | |
34 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) | |
35 #endif | |
36 #if !defined(S_ISCHR) && defined(S_IFCHR) | |
37 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) | |
38 #endif | |
39 #if !defined(S_ISDIR) && defined(S_IFDIR) | |
40 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | |
41 #endif | |
42 #if !defined(S_ISREG) && defined(S_IFREG) | |
43 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | |
44 #endif | |
45 #if !defined(S_ISFIFO) && defined(S_IFIFO) | |
46 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | |
47 #endif | |
48 #if !defined(S_ISLNK) && defined(S_IFLNK) | |
49 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) | |
50 #endif | |
51 #if !defined(S_ISSOCK) && defined(S_IFSOCK) | |
52 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) | |
53 #endif | |
54 #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ | |
55 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) | |
56 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) | |
57 #endif | |
58 #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ | |
59 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) | |
60 #endif | |
61 | |
62 #ifndef S_ISLNK | |
63 #define lstat stat | |
64 #endif | |
65 | |
66 #endif | |
67 | |
68 /* | |
69 ;;; Local Variables: *** | |
70 ;;; mode: C++ *** | |
71 ;;; page-delimiter: "^/\\*" *** | |
72 ;;; End: *** | |
73 */ |