1 | /* dirent.h for vms
|
---|
2 | Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
---|
3 | 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
---|
4 | This file is part of GNU Make.
|
---|
5 |
|
---|
6 | GNU Make is free software; you can redistribute it and/or modify it under the
|
---|
7 | terms of the GNU General Public License as published by the Free Software
|
---|
8 | Foundation; either version 3 of the License, or (at your option) any later
|
---|
9 | version.
|
---|
10 |
|
---|
11 | GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
---|
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
---|
13 | A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
---|
14 |
|
---|
15 | You should have received a copy of the GNU General Public License along with
|
---|
16 | this program. If not, see <http://www.gnu.org/licenses/>. */
|
---|
17 |
|
---|
18 | #ifndef VMSDIR_H
|
---|
19 | #define VMSDIR_H
|
---|
20 |
|
---|
21 | #include <rms.h>
|
---|
22 |
|
---|
23 | #define MAXNAMLEN 255
|
---|
24 |
|
---|
25 | #ifndef __DECC
|
---|
26 | #if !defined (__GNUC__) && !defined (__ALPHA)
|
---|
27 | typedef unsigned long u_long;
|
---|
28 | typedef unsigned short u_short;
|
---|
29 | #endif
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | struct direct
|
---|
33 | {
|
---|
34 | off_t d_off;
|
---|
35 | u_long d_fileno;
|
---|
36 | u_short d_reclen;
|
---|
37 | u_short d_namlen;
|
---|
38 | char d_name[MAXNAMLEN + 1];
|
---|
39 | };
|
---|
40 |
|
---|
41 | #undef DIRSIZ
|
---|
42 | #define DIRSIZ(dp) \
|
---|
43 | (((sizeof (struct direct) \
|
---|
44 | - (MAXNAMLEN+1) \
|
---|
45 | + ((dp)->d_namlen+1)) \
|
---|
46 | + 3) & ~3)
|
---|
47 |
|
---|
48 | #define d_ino d_fileno /* compatability */
|
---|
49 |
|
---|
50 |
|
---|
51 | /*
|
---|
52 | * Definitions for library routines operating on directories.
|
---|
53 | */
|
---|
54 |
|
---|
55 | typedef struct DIR
|
---|
56 | {
|
---|
57 | struct direct dir;
|
---|
58 | char d_result[MAXNAMLEN + 1];
|
---|
59 | #if defined (__ALPHA) || defined (__DECC)
|
---|
60 | struct FAB fab;
|
---|
61 | #else
|
---|
62 | struct fabdef fab;
|
---|
63 | #endif
|
---|
64 | } DIR;
|
---|
65 |
|
---|
66 | #ifndef NULL
|
---|
67 | #define NULL 0
|
---|
68 | #endif
|
---|
69 |
|
---|
70 | #define rewinddir(dirp) seekdir((dirp), (long)0)
|
---|
71 |
|
---|
72 | DIR *opendir ();
|
---|
73 | struct direct *readdir (DIR *dfd);
|
---|
74 | int closedir (DIR *dfd);
|
---|
75 | const char *vmsify (const char *name, int type);
|
---|
76 |
|
---|
77 | #endif /* VMSDIR_H */
|
---|