aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-12 21:49:52 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-12 21:49:52 -0800
commit1e86274cd4e544628d5f6e327eb62094051e7948 (patch)
tree93da98aa1cf2d76c0a1caf3266ff36e8d2a3de12 /compat/mingw.h
parentcd425a1585bf0c1b92faa772b664dadd3294bf19 (diff)
parentd1b6e6e015501272c7491b3a4adf3cd3904edefa (diff)
downloadgit-1e86274cd4e544628d5f6e327eb62094051e7948.tar.gz
git-1e86274cd4e544628d5f6e327eb62094051e7948.tar.xz
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.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 35d9813b6..228307110 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
*/