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
52505ab5
Commit
52505ab5
authored
Jul 07, 2021
by
Calvin Buckley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert long long constant specifiers to stdint macros
parent
c1aca3fe
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
src/commit_graph.c
+1
-1
src/diff_xdiff.h
+1
-1
src/hashsig.c
+1
-1
src/mwindow.c
+1
-1
src/util.h
+1
-1
src/win32/w32_util.h
+5
-5
No files found.
src/commit_graph.c
View file @
52505ab5
...
@@ -304,7 +304,7 @@ static int git_commit_graph_entry_get_byindex(
...
@@ -304,7 +304,7 @@ static int git_commit_graph_entry_get_byindex(
e
->
generation
=
ntohl
(
*
((
uint32_t
*
)(
commit_data
+
GIT_OID_RAWSZ
+
2
*
sizeof
(
uint32_t
))));
e
->
generation
=
ntohl
(
*
((
uint32_t
*
)(
commit_data
+
GIT_OID_RAWSZ
+
2
*
sizeof
(
uint32_t
))));
e
->
commit_time
=
ntohl
(
*
((
uint32_t
*
)(
commit_data
+
GIT_OID_RAWSZ
+
3
*
sizeof
(
uint32_t
))));
e
->
commit_time
=
ntohl
(
*
((
uint32_t
*
)(
commit_data
+
GIT_OID_RAWSZ
+
3
*
sizeof
(
uint32_t
))));
e
->
commit_time
|=
(
e
->
generation
&
0x3ull
)
<<
32ull
;
e
->
commit_time
|=
(
e
->
generation
&
UINT64_C
(
0x3
))
<<
UINT64_C
(
32
)
;
e
->
generation
>>=
2u
;
e
->
generation
>>=
2u
;
if
(
e
->
parent_indices
[
1
]
&
0x80000000u
)
{
if
(
e
->
parent_indices
[
1
]
&
0x80000000u
)
{
uint32_t
extra_edge_list_pos
=
e
->
parent_indices
[
1
]
&
0x7fffffff
;
uint32_t
extra_edge_list_pos
=
e
->
parent_indices
[
1
]
&
0x7fffffff
;
...
...
src/diff_xdiff.h
View file @
52505ab5
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
/* xdiff cannot cope with large files. these files should not be passed to
/* xdiff cannot cope with large files. these files should not be passed to
* xdiff. callers should treat these large files as binary.
* xdiff. callers should treat these large files as binary.
*/
*/
#define GIT_XDIFF_MAX_SIZE (
1024LL
* 1024 * 1023)
#define GIT_XDIFF_MAX_SIZE (
INT64_C(1024)
* 1024 * 1023)
/* A git_xdiff_output is a git_patch_generate_output with extra fields
/* A git_xdiff_output is a git_patch_generate_output with extra fields
* necessary to use libxdiff. Calling git_xdiff_init() will set the diff_cb
* necessary to use libxdiff. Calling git_xdiff_init() will set the diff_cb
...
...
src/hashsig.c
View file @
52505ab5
...
@@ -17,7 +17,7 @@ typedef uint64_t hashsig_state;
...
@@ -17,7 +17,7 @@ typedef uint64_t hashsig_state;
#define HASHSIG_SCALE 100
#define HASHSIG_SCALE 100
#define HASHSIG_MAX_RUN 80
#define HASHSIG_MAX_RUN 80
#define HASHSIG_HASH_START
0x012345678ABCDEF0LL
#define HASHSIG_HASH_START
INT64_C(0x012345678ABCDEF0)
#define HASHSIG_HASH_SHIFT 5
#define HASHSIG_HASH_SHIFT 5
#define HASHSIG_HASH_MIX(S,CH) \
#define HASHSIG_HASH_MIX(S,CH) \
...
...
src/mwindow.c
View file @
52505ab5
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
: 32 * 1024 * 1024)
: 32 * 1024 * 1024)
#define DEFAULT_MAPPED_LIMIT \
#define DEFAULT_MAPPED_LIMIT \
((1024 * 1024) * (sizeof(void*) >= 8 ?
8192ULL
: 256UL))
((1024 * 1024) * (sizeof(void*) >= 8 ?
UINT64_C(8192)
: 256UL))
/* default is unlimited */
/* default is unlimited */
#define DEFAULT_FILE_LIMIT 0
#define DEFAULT_FILE_LIMIT 0
...
...
src/util.h
View file @
52505ab5
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
#define MSB(x, bits) ((x) & (~
0ULL
<< (bitsizeof(x) - (bits))))
#define MSB(x, bits) ((x) & (~
UINT64_C(0)
<< (bitsizeof(x) - (bits))))
#ifndef min
#ifndef min
# define min(a,b) ((a) < (b) ? (a) : (b))
# define min(a,b) ((a) < (b) ? (a) : (b))
#endif
#endif
...
...
src/win32/w32_util.h
View file @
52505ab5
...
@@ -75,7 +75,7 @@ GIT_INLINE(void) git_win32__filetime_to_timespec(
...
@@ -75,7 +75,7 @@ GIT_INLINE(void) git_win32__filetime_to_timespec(
struct
timespec
*
ts
)
struct
timespec
*
ts
)
{
{
int64_t
winTime
=
((
int64_t
)
ft
->
dwHighDateTime
<<
32
)
+
ft
->
dwLowDateTime
;
int64_t
winTime
=
((
int64_t
)
ft
->
dwHighDateTime
<<
32
)
+
ft
->
dwLowDateTime
;
winTime
-=
116444736000000000LL
;
/* Windows to Unix Epoch conversion */
winTime
-=
INT64_C
(
116444736000000000
)
;
/* Windows to Unix Epoch conversion */
ts
->
tv_sec
=
(
time_t
)(
winTime
/
10000000
);
ts
->
tv_sec
=
(
time_t
)(
winTime
/
10000000
);
#ifdef GIT_USE_NSEC
#ifdef GIT_USE_NSEC
ts
->
tv_nsec
=
(
winTime
%
10000000
)
*
100
;
ts
->
tv_nsec
=
(
winTime
%
10000000
)
*
100
;
...
@@ -87,11 +87,11 @@ GIT_INLINE(void) git_win32__filetime_to_timespec(
...
@@ -87,11 +87,11 @@ GIT_INLINE(void) git_win32__filetime_to_timespec(
GIT_INLINE
(
void
)
git_win32__timeval_to_filetime
(
GIT_INLINE
(
void
)
git_win32__timeval_to_filetime
(
FILETIME
*
ft
,
const
struct
p_timeval
tv
)
FILETIME
*
ft
,
const
struct
p_timeval
tv
)
{
{
int64_t
ticks
=
(
tv
.
tv_sec
*
10000000LL
)
+
int64_t
ticks
=
(
tv
.
tv_sec
*
INT64_C
(
10000000
)
)
+
(
tv
.
tv_usec
*
10LL
)
+
116444736000000000LL
;
(
tv
.
tv_usec
*
INT64_C
(
10
))
+
INT64_C
(
116444736000000000
)
;
ft
->
dwHighDateTime
=
((
ticks
>>
32
)
&
0xffffffffLL
);
ft
->
dwHighDateTime
=
((
ticks
>>
32
)
&
INT64_C
(
0xffffffff
)
);
ft
->
dwLowDateTime
=
(
ticks
&
0xffffffffLL
);
ft
->
dwLowDateTime
=
(
ticks
&
INT64_C
(
0xffffffff
)
);
}
}
GIT_INLINE
(
void
)
git_win32__stat_init
(
GIT_INLINE
(
void
)
git_win32__stat_init
(
...
...
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