mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 13:25:18 +00:00
Add mode_t definition in MSVC compat layer
This commit is contained in:
parent
95818ff73a
commit
63fadf99dc
@ -633,7 +633,7 @@ static int do_lstat(const char *file_name, struct stat *buf)
|
|||||||
buf->st_gid = 0;
|
buf->st_gid = 0;
|
||||||
buf->st_uid = 0;
|
buf->st_uid = 0;
|
||||||
buf->st_nlink = 1;
|
buf->st_nlink = 1;
|
||||||
buf->st_mode = (unsigned short)fMode;
|
buf->st_mode = (mode_t)fMode;
|
||||||
buf->st_size = fdata.nFileSizeLow; /* Can't use nFileSizeHigh, since it's not a stat64 */
|
buf->st_size = fdata.nFileSizeLow; /* Can't use nFileSizeHigh, since it's not a stat64 */
|
||||||
buf->st_dev = buf->st_rdev = (_getdrive() - 1);
|
buf->st_dev = buf->st_rdev = (_getdrive() - 1);
|
||||||
buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
|
buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
# define S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
# define S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
||||||
# define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK)
|
# define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK)
|
||||||
|
|
||||||
|
# define mode_t unsigned short
|
||||||
|
|
||||||
/* case-insensitive string comparison */
|
/* case-insensitive string comparison */
|
||||||
# define strcasecmp _stricmp
|
# define strcasecmp _stricmp
|
||||||
# define strncasecmp _strnicmp
|
# define strncasecmp _strnicmp
|
||||||
|
Loading…
Reference in New Issue
Block a user