blob: 083158eb390b8999386c92eba3f1b000f37813d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/* libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir */
/* Written 2000 by Werner Almesberger */
#ifndef _SYS_DIRENT_H
#define _SYS_DIRENT_H
#include <sys/types.h>
#include <linux/dirent.h>
#define _LIBC 1
#define NOT_IN_libc 1
#include <sys/lock.h>
#undef _LIBC
#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */
#define HAVE_DD_LOCK /* have locking mechanism */
#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */
typedef struct {
int dd_fd; /* directory file */
int dd_loc; /* position in buffer */
int dd_seek;
char *dd_buf; /* buffer */
int dd_len; /* buffer length */
int dd_size; /* amount of data in buffer */
_LOCK_RECURSIVE_T dd_lock;
} DIR;
#define __dirfd(dir) (dir)->dd_fd
/* --- redundant --- */
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
void rewinddir(DIR *);
int closedir(DIR *);
/* internal prototype */
void _seekdir(DIR *dir,off_t offset);
#ifndef _POSIX_SOURCE
long telldir (DIR *);
void seekdir (DIR *, off_t loc);
int scandir (const char *__dir,
struct dirent ***__namelist,
int (*select) (const struct dirent *),
int (*compar) (const struct dirent **, const struct dirent **));
int alphasort (const struct dirent **__a, const struct dirent **__b);
#endif /* _POSIX_SOURCE */
#endif
|