summaryrefslogtreecommitdiff
path: root/klibc/include/dirent.h
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-10-05 18:51:53 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:37:02 -0700
commit60d1e263f0da2976938fa54efec88ab777a6b3c3 (patch)
tree94bfcc4279827a68f90f8b63c0d458ddc753c69b /klibc/include/dirent.h
parenta0622777688ad84ef3d789e0171cfb0ca3dc21d2 (diff)
[PATCH] oops forgot to add the new klibc/include directory
Diffstat (limited to 'klibc/include/dirent.h')
-rw-r--r--klibc/include/dirent.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/klibc/include/dirent.h b/klibc/include/dirent.h
new file mode 100644
index 0000000000..4db479592b
--- /dev/null
+++ b/klibc/include/dirent.h
@@ -0,0 +1,32 @@
+/*
+ * dirent.h
+ */
+
+#ifndef _DIRENT_H
+#define _DIRENT_H
+
+#include <klibc/extern.h>
+#include <sys/dirent.h>
+
+struct _IO_dir {
+ int __fd;
+
+#ifdef __KLIBC_DIRENT_INTERNALS
+ /* These fields for internal use only */
+
+ size_t bytes_left;
+ struct dirent *next;
+ /* Declaring this as an array of struct enforces correct alignment */
+ struct dirent buffer[15]; /* 15 times max dirent size =~ 4K */
+#endif
+};
+typedef struct _IO_dir DIR;
+
+__extern DIR *opendir(const char *);
+__extern struct dirent *readdir(DIR *);
+__extern int closedir(DIR *);
+static __inline__ int dirfd (DIR *__d) {
+ return __d->__fd;
+}
+
+#endif /* _DIRENT_H */