summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-10-22 16:47:28 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-10-22 16:47:28 +0000
commit38f3d012d654631e29deea6924d4c2c682ebdd4a (patch)
tree5b0bf1cf8bb359551c6ea827a064dfc2fd863c11 /legacy
parent9c5ce8345e191068e6d53a078a5f49d48713b52b (diff)
[evil] use our own dirent structure and implementation instead of
mingw one. SVN revision: 53773
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evil/ChangeLog8
-rw-r--r--legacy/evil/src/lib/Makefile.am2
-rw-r--r--legacy/evil/src/lib/dirent.h7
-rw-r--r--legacy/evil/src/lib/evil_dirent.c5
4 files changed, 19 insertions, 3 deletions
diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog
index 5514b0c0af..c1efe0374c 100644
--- a/legacy/evil/ChangeLog
+++ b/legacy/evil/ChangeLog
@@ -1,3 +1,11 @@
12010-10-22 Vincent Torri <doursse at users dot sf dot net>
2
3 * src/lib/Makefile.am:
4 * src/lib/dirent.h:
5 * src/lib/evil_dirent.c:
6 use our own dirent structure and implementation instead of
7 mingw one.
8
12010-09-14 Vincent Torri <doursse at users dot sf dot net> 92010-09-14 Vincent Torri <doursse at users dot sf dot net>
2 10
3 * src/lib/Makefile.am: 11 * src/lib/Makefile.am:
diff --git a/legacy/evil/src/lib/Makefile.am b/legacy/evil/src/lib/Makefile.am
index 9666fb2e92..351ac3692a 100644
--- a/legacy/evil/src/lib/Makefile.am
+++ b/legacy/evil/src/lib/Makefile.am
@@ -18,7 +18,7 @@ evil_time.h \
18evil_unistd.h \ 18evil_unistd.h \
19evil_util.h 19evil_util.h
20 20
21nobase_include_HEADERS = pwd.h sys/mman.h fnmatch.h 21nobase_include_HEADERS = pwd.h sys/mman.h fnmatch.h dirent.h
22 22
23if EVIL_HAVE_WINCE 23if EVIL_HAVE_WINCE
24 24
diff --git a/legacy/evil/src/lib/dirent.h b/legacy/evil/src/lib/dirent.h
index e61ea37b07..ac6d4faeb5 100644
--- a/legacy/evil/src/lib/dirent.h
+++ b/legacy/evil/src/lib/dirent.h
@@ -22,13 +22,16 @@
22# include <wchar.h> 22# include <wchar.h>
23#endif 23#endif
24 24
25#define DT_UNKNOWN 0
26#define DT_DIR 4
25 27
26typedef struct DIR DIR; 28typedef struct DIR DIR;
27 29
28struct dirent 30struct dirent
29{ 31{
30 char d_name[260 + 1]; 32 char d_name[260 + 1];
31 int d_mode; 33 int d_mode;
34 unsigned char d_type;
32}; 35};
33 36
34 37
diff --git a/legacy/evil/src/lib/evil_dirent.c b/legacy/evil/src/lib/evil_dirent.c
index 0fb1d99080..e02b95fe27 100644
--- a/legacy/evil/src/lib/evil_dirent.c
+++ b/legacy/evil/src/lib/evil_dirent.c
@@ -137,6 +137,11 @@ DIR *opendir(char const *name)
137#endif 137#endif
138 dir->dirent.d_mode = (int)dir->data.dwFileAttributes; 138 dir->dirent.d_mode = (int)dir->data.dwFileAttributes;
139 139
140 if (dir->data.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
141 dir->dirent.d_type = DT_DIR;
142 else
143 dir->dirent.d_type = DT_UNKNOWN;
144
140 return dir; 145 return dir;
141} 146}
142 147