chiark / gitweb /
Make run_directory.c stat the place it is going to try to run.
[elogind.git] / klibc / include / dirent.h
1 /*
2  * dirent.h
3  */
4
5 #ifndef _DIRENT_H
6 #define _DIRENT_H
7
8 #include <klibc/extern.h>
9 #include <sys/dirent.h>
10
11 struct _IO_dir {
12   int __fd;
13
14 #ifdef __KLIBC_DIRENT_INTERNALS
15   /* These fields for internal use only */
16
17   size_t bytes_left;
18   struct dirent *next;
19   /* Declaring this as an array of struct enforces correct alignment */
20   struct dirent buffer[15];     /* 15 times max dirent size =~ 4K */
21 #endif
22 };
23 typedef struct _IO_dir DIR;
24
25 __extern DIR *opendir(const char *);
26 __extern struct dirent *readdir(DIR *);
27 __extern int closedir(DIR *);
28 static __inline__ int dirfd (DIR *__d) {
29   return __d->__fd;
30 }
31
32 #endif /* _DIRENT_H */