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