2006-02-11 19:02:21 +00:00
|
|
|
/* dirent.h for vms
|
2014-09-30 12:33:21 +00:00
|
|
|
Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
2006-02-11 19:02:21 +00:00
|
|
|
This file is part of GNU Make.
|
|
|
|
|
|
|
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
|
|
terms of the GNU General Public License as published by the Free Software
|
2007-07-04 19:35:15 +00:00
|
|
|
Foundation; either version 3 of the License, or (at your option) any later
|
|
|
|
version.
|
2006-02-11 19:02:21 +00:00
|
|
|
|
|
|
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
2007-07-04 19:35:15 +00:00
|
|
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
1996-03-20 14:57:41 +00:00
|
|
|
|
2000-01-22 05:43:03 +00:00
|
|
|
#ifndef VMSDIR_H
|
|
|
|
#define VMSDIR_H
|
|
|
|
|
1996-03-20 14:57:41 +00:00
|
|
|
#include <rms.h>
|
|
|
|
|
|
|
|
#define MAXNAMLEN 255
|
|
|
|
|
1997-08-27 20:30:54 +00:00
|
|
|
#ifndef __DECC
|
2000-01-22 05:43:03 +00:00
|
|
|
#if !defined (__GNUC__) && !defined (__ALPHA)
|
1996-03-20 14:57:41 +00:00
|
|
|
typedef unsigned long u_long;
|
|
|
|
typedef unsigned short u_short;
|
1997-08-27 20:30:54 +00:00
|
|
|
#endif
|
2000-01-22 05:43:03 +00:00
|
|
|
#endif
|
1996-03-20 14:57:41 +00:00
|
|
|
|
2000-01-22 05:43:03 +00:00
|
|
|
struct direct
|
|
|
|
{
|
1996-03-20 14:57:41 +00:00
|
|
|
off_t d_off;
|
|
|
|
u_long d_fileno;
|
|
|
|
u_short d_reclen;
|
|
|
|
u_short d_namlen;
|
|
|
|
char d_name[MAXNAMLEN + 1];
|
|
|
|
};
|
|
|
|
|
|
|
|
#undef DIRSIZ
|
2000-01-22 05:43:03 +00:00
|
|
|
#define DIRSIZ(dp) \
|
|
|
|
(((sizeof (struct direct) \
|
|
|
|
- (MAXNAMLEN+1) \
|
|
|
|
+ ((dp)->d_namlen+1)) \
|
|
|
|
+ 3) & ~3)
|
1996-03-20 14:57:41 +00:00
|
|
|
|
2013-04-30 13:37:03 +00:00
|
|
|
#define d_ino d_fileno /* compatibility */
|
1996-03-20 14:57:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Definitions for library routines operating on directories.
|
|
|
|
*/
|
|
|
|
|
2000-01-22 05:43:03 +00:00
|
|
|
typedef struct DIR
|
|
|
|
{
|
|
|
|
struct direct dir;
|
|
|
|
char d_result[MAXNAMLEN + 1];
|
|
|
|
#if defined (__ALPHA) || defined (__DECC)
|
|
|
|
struct FAB fab;
|
|
|
|
#else
|
|
|
|
struct fabdef fab;
|
|
|
|
#endif
|
|
|
|
} DIR;
|
1996-03-20 14:57:41 +00:00
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL 0
|
|
|
|
#endif
|
2000-01-22 05:43:03 +00:00
|
|
|
|
1996-03-20 14:57:41 +00:00
|
|
|
#define rewinddir(dirp) seekdir((dirp), (long)0)
|
2006-04-07 01:43:44 +00:00
|
|
|
|
|
|
|
DIR *opendir ();
|
|
|
|
struct direct *readdir (DIR *dfd);
|
|
|
|
int closedir (DIR *dfd);
|
2006-11-18 20:53:44 +00:00
|
|
|
const char *vmsify (const char *name, int type);
|
1996-03-20 14:57:41 +00:00
|
|
|
|
2000-01-22 05:43:03 +00:00
|
|
|
#endif /* VMSDIR_H */
|