[PATCH 3/5] Win32 dirent: change FILENAME_MAX to MAX_PATH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Karsten Blees <blees@xxxxxxx>
Date: Fri, 7 Jan 2011 17:43:14 +0100

FILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is
used throughout the other Win32 code in Git, and also defines the length
of file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName,
from which we're copying the dirent data).

Signed-off-by: Karsten Blees <blees@xxxxxxx>
Signed-off-by: Erik Faye-Lund <kusmabite@xxxxxxxxx>
Signed-off-by: Stepan Kasal <kasal@xxxxxx>
---
 compat/win32/dirent.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat/win32/dirent.h b/compat/win32/dirent.h
index 7f4e6c7..8838cd6 100644
--- a/compat/win32/dirent.h
+++ b/compat/win32/dirent.h
@@ -9,8 +9,8 @@ typedef struct DIR DIR;
 #define DT_LNK     3
 
 struct dirent {
-	char d_name[FILENAME_MAX];       /* File name. */
 	unsigned char d_type;      /* file type to prevent lstat after readdir */
+	char d_name[MAX_PATH];     /* file name */
 };
 
 DIR *opendir(const char *dirname);
-- 
2.0.0.9635.g0be03cb

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]