* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / win32 / dir.h
bloba0c7fa86c6638806f531429154340c05dd77cf2e
1 #ifndef RUBY_WIN32_DIR_H
2 #define RUBY_WIN32_DIR_H
4 #ifdef __BORLANDC__
5 # ifndef WIN32_DIR_H_
6 # define WIN32_DIR_H_
7 # include <sys/types.h>
8 # endif
9 #endif
11 struct direct
13 long d_namlen;
14 ino_t d_ino;
15 char *d_name;
16 char d_isdir; /* directory */
17 char d_isrep; /* reparse point */
19 typedef struct {
20 char *start;
21 char *curr;
22 long size;
23 long nfiles;
24 long loc; /* [0, nfiles) */
25 struct direct dirstr;
26 char *bits; /* used for d_isdir and d_isrep */
27 } DIR;
30 DIR* rb_w32_opendir(const char*);
31 struct direct* rb_w32_readdir(DIR *);
32 off_t rb_w32_telldir(DIR *);
33 void rb_w32_seekdir(DIR *, off_t);
34 void rb_w32_rewinddir(DIR *);
35 void rb_w32_closedir(DIR *);
37 #define opendir rb_w32_opendir
38 #define readdir rb_w32_readdir
39 #define telldir rb_w32_telldir
40 #define seekdir rb_w32_seekdir
41 #define rewinddir rb_w32_rewinddir
42 #define closedir rb_w32_closedir
44 #endif /* RUBY_WIN32_DIR_H */