Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
63ad4394
Commit
63ad4394
authored
Jun 11, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #253 from sschuberth/msvc10-fixes
Msvc10 fixes
parents
e3f56a2b
e6480970
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
src/fileops.c
+2
-2
src/fileops.h
+3
-0
src/index.c
+2
-2
src/msvc-compat.h
+5
-2
No files found.
src/fileops.c
View file @
63ad4394
...
...
@@ -603,7 +603,7 @@ int gitfo_getcwd(char *buffer_out, size_t size)
}
#ifdef GIT_WIN32
static
inline
time_t
filetime_to_time_t
(
const
FILETIME
*
ft
)
GIT_INLINE
(
time_t
)
filetime_to_time_t
(
const
FILETIME
*
ft
)
{
long
long
winTime
=
((
long
long
)
ft
->
dwHighDateTime
<<
32
)
+
ft
->
dwLowDateTime
;
winTime
-=
116444736000000000LL
;
/* Windows to Unix Epoch conversion */
...
...
@@ -627,7 +627,7 @@ static int do_lstat(const char *file_name, struct stat *buf)
fMode
|=
S_IWRITE
;
if
(
fdata
.
dwFileAttributes
&
FILE_ATTRIBUTE_REPARSE_POINT
)
fMode
|=
_
S_IFLNK
;
fMode
|=
S_IFLNK
;
buf
->
st_ino
=
0
;
buf
->
st_gid
=
0
;
...
...
src/fileops.h
View file @
63ad4394
...
...
@@ -98,6 +98,9 @@ extern int gitfo_mv_force(const char *from, const char *to);
#ifdef GIT_WIN32
# define gitfo_lstat(p,b) gitfo_lstat__w32(p,b)
# define gitfo_readlink(a, b, c) gitfo_readlink__w32(a, b, c)
extern
int
gitfo_lstat__w32
(
const
char
*
file_name
,
struct
stat
*
buf
);
extern
int
gitfo_readlink__w32
(
const
char
*
link
,
char
*
target
,
size_t
target_len
);
#else
# define gitfo_lstat(p,b) lstat(p,b)
# define gitfo_readlink(a, b, c) readlink(a, b, c)
...
...
src/index.c
View file @
63ad4394
...
...
@@ -142,8 +142,8 @@ unsigned int index_create_mode(unsigned int mode)
{
if
(
S_ISLNK
(
mode
))
return
S_IFLNK
;
if
(
S_ISDIR
(
mode
)
||
(
mode
&
S_IFMT
)
==
0160000
)
return
0160000
;
if
(
S_ISDIR
(
mode
)
||
(
mode
&
S_IFMT
)
==
(
S_IFLNK
|
S_IFDIR
)
)
return
(
S_IFLNK
|
S_IFDIR
)
;
return
S_IFREG
|
((
mode
&
0100
)
?
0755
:
0644
);
}
...
...
src/msvc-compat.h
View file @
63ad4394
...
...
@@ -12,14 +12,17 @@
# define stat _stat64
# define fstat _fstat64
#define _S_IFLNK 0120000
/* stat: file mode type testing macros */
# define _S_IFLNK 0120000
# define S_IFLNK _S_IFLNK
# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
# define S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
# define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK)
# define MAXPATHLEN MAX_PATH
/* case-insensitive string comparison */
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment