summaryrefslogtreecommitdiff
path: root/trunk/win32/dir.h
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:02:05 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:02:05 +0000
commit0dc342de848a642ecce8db697b8fecd83a63e117 (patch)
tree2b7ed4724aff1f86073e4740134bda9c4aac1a39 /trunk/win32/dir.h
parentef70cf7138ab8034b5b806f466e4b484b24f0f88 (diff)
added tag v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/win32/dir.h')
-rw-r--r--trunk/win32/dir.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/trunk/win32/dir.h b/trunk/win32/dir.h
new file mode 100644
index 0000000000..a0c7fa86c6
--- /dev/null
+++ b/trunk/win32/dir.h
@@ -0,0 +1,44 @@
+#ifndef RUBY_WIN32_DIR_H
+#define RUBY_WIN32_DIR_H
+
+#ifdef __BORLANDC__
+# ifndef WIN32_DIR_H_
+# define WIN32_DIR_H_
+# include <sys/types.h>
+# endif
+#endif
+
+struct direct
+{
+ long d_namlen;
+ ino_t d_ino;
+ char *d_name;
+ char d_isdir; /* directory */
+ char d_isrep; /* reparse point */
+};
+typedef struct {
+ char *start;
+ char *curr;
+ long size;
+ long nfiles;
+ long loc; /* [0, nfiles) */
+ struct direct dirstr;
+ char *bits; /* used for d_isdir and d_isrep */
+} DIR;
+
+
+DIR* rb_w32_opendir(const char*);
+struct direct* rb_w32_readdir(DIR *);
+off_t rb_w32_telldir(DIR *);
+void rb_w32_seekdir(DIR *, off_t);
+void rb_w32_rewinddir(DIR *);
+void rb_w32_closedir(DIR *);
+
+#define opendir rb_w32_opendir
+#define readdir rb_w32_readdir
+#define telldir rb_w32_telldir
+#define seekdir rb_w32_seekdir
+#define rewinddir rb_w32_rewinddir
+#define closedir rb_w32_closedir
+
+#endif /* RUBY_WIN32_DIR_H */