OSDN Git Service

r288@cf-ppc-macosx: monabuilder | 2008-12-07 13:17:34 +0900
[pf3gnuchains/pf3gnuchains3x.git] / newlib / libc / sys / sun4 / sys / dirent.h
1 /* FIXME: From sys/sysvi386/sys */
2 #ifndef _SYS_DIRENT_H
3 # define _SYS_DIRENT_H
4
5 /*
6  * This file was written to be compatible with the BSD directory
7  * routines, so it looks like it.  But it was written from scratch.
8  * Sean Eric Fagan, sef@Kithrup.COM
9  *
10  * Modified by dje@cygnus.com for sun.
11  */
12
13 typedef struct __dirdesc {
14         int     dd_fd;
15         long    dd_loc;
16         long    dd_size;
17         long    dd_bsize;
18         long    dd_off;
19         char    *dd_buf;
20 } DIR;
21
22 # define __dirfd(dp)    ((dp)->dd_fd)
23
24 DIR *opendir (const char *);
25 struct dirent *readdir (DIR *);
26 void rewinddir (DIR *);
27 int closedir (DIR *);
28
29 #include <sys/types.h>
30
31 #define MAXNAMLEN       255
32
33 #define d_ino   d_fileno        /* compatibility */
34
35 struct dirent {
36         off_t           d_off;
37         unsigned long   d_fileno;
38         unsigned short  d_reclen;
39         unsigned short  d_namlen;
40         char            d_name[MAXNAMLEN + 1];
41 };
42
43 /* FIXME: include definition of DIRSIZ() ? */
44
45 #endif