diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-12 21:49:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-12 21:49:52 -0800 |
commit | 1e86274cd4e544628d5f6e327eb62094051e7948 (patch) | |
tree | 93da98aa1cf2d76c0a1caf3266ff36e8d2a3de12 /compat/mingw.h | |
parent | cd425a1585bf0c1b92faa772b664dadd3294bf19 (diff) | |
parent | d1b6e6e015501272c7491b3a4adf3cd3904edefa (diff) | |
download | git-1e86274cd4e544628d5f6e327eb62094051e7948.tar.gz |
Merge branch 'ef/win32-dirent'
* ef/win32-dirent:
win32: use our own dirent.h
msvc: opendir: handle paths ending with a slash
win32: dirent: handle errors
msvc: opendir: do not start the search
msvc: opendir: allocate enough memory
msvc: opendir: fix malloc-failure
Conflicts:
Makefile
Diffstat (limited to 'compat/mingw.h')
-rw-r--r-- | compat/mingw.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 35d9813b6b..2283071109 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -322,35 +322,6 @@ int main(int argc, const char **argv) \ } \ static int mingw_main(c,v) -#ifndef NO_MINGW_REPLACE_READDIR -/* - * A replacement of readdir, to ensure that it reads the file type at - * the same time. This avoid extra unneeded lstats in git on MinGW - */ -#undef DT_UNKNOWN -#undef DT_DIR -#undef DT_REG -#undef DT_LNK -#define DT_UNKNOWN 0 -#define DT_DIR 1 -#define DT_REG 2 -#define DT_LNK 3 - -struct mingw_dirent -{ - long d_ino; /* Always zero. */ - union { - unsigned short d_reclen; /* Always zero. */ - unsigned char d_type; /* Reimplementation adds this */ - }; - unsigned short d_namlen; /* Length of name in d_name. */ - char d_name[FILENAME_MAX]; /* File name. */ -}; -#define dirent mingw_dirent -#define readdir(x) mingw_readdir(x) -struct dirent *mingw_readdir(DIR *dir); -#endif // !NO_MINGW_REPLACE_READDIR - /* * Used by Pthread API implementation for Windows */ |