]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Win32 dirent: remove unused dirent.d_reclen member
authorKarsten Blees <blees@dcon.de>
Fri, 7 Jan 2011 16:38:25 +0000 (17:38 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jun 2014 22:10:53 +0000 (15:10 -0700)
Remove the union around dirent.d_type and the unused dirent.d_reclen member
(which was necessary for compatibility with the MinGW dirent runtime, which
is no longer used).

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/win32/dirent.h

index b38973b051a4ac79e45ff61a9755b491193b3089..7f4e6c71d9e25e564e64cd082fdc2b44a03704da 100644 (file)
@@ -10,10 +10,7 @@ typedef struct DIR DIR;
 
 struct dirent {
        char d_name[FILENAME_MAX];       /* File name. */
-       union {
-               unsigned short d_reclen; /* Always zero. */
-               unsigned char  d_type;   /* Reimplementation adds this */
-       };
+       unsigned char d_type;      /* file type to prevent lstat after readdir */
 };
 
 DIR *opendir(const char *dirname);