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
c3fad0ae
Commit
c3fad0ae
authored
Jun 09, 2012
by
Chris Young
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of github.com:chris-y/libgit2 into development
parents
41cbbea8
7d1983eb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
8 deletions
+25
-8
CMakeLists.txt
+1
-1
README.amiga
+4
-0
include/git2/common.h
+1
-5
src/netops.c
+10
-2
src/path.c
+9
-0
src/ppc/sha1ppc.S.obj
+0
-0
No files found.
CMakeLists.txt
View file @
c3fad0ae
...
...
@@ -24,7 +24,7 @@ STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
SET
(
LIBGIT2_VERSION_STRING
"
${
LIBGIT2_VERSION_MAJOR
}
.
${
LIBGIT2_VERSION_MINOR
}
.
${
LIBGIT2_VERSION_REV
}
"
)
# Uncomment out the line below to use PowerPC SHA1
#
SET(SHA1_TYPE "ppc")
SET
(
SHA1_TYPE
"ppc"
)
# Find required dependencies
INCLUDE_DIRECTORIES
(
src include deps/http-parser
)
...
...
README.amiga
0 → 100755
View file @
c3fad0ae
Nasty build hack:
When setting SHA1 to ppc in CMakeLists.txt, after running initial CMake,
copy src/ppc/sha1ppc.S.obj to build/CMakeFiles/git2.dir/src/ppc/
Add CMakeFiles/git2.dir/src/ppc/sha1ppc.S.obj to the list in build/CMakeFiles/git2.dir/link.txt
include/git2/common.h
View file @
c3fad0ae
...
...
@@ -56,11 +56,7 @@
#endif
#ifdef __amigaos4__
/* Network byte order is big-endian... so is PPC, so these functions are NOP */
#define htonl(x) x
#define ntohl(x) x
#define htons(x) x
#define ntohs(x) x
#include <netinet/in.h>
#endif
/**
...
...
src/netops.c
View file @
c3fad0ae
...
...
@@ -382,7 +382,9 @@ int gitno_connect(git_transport *t, const char *host, const char *port)
#else
int
p
;
struct
hostent
*
hent
;
struct
servent
*
sent
;
struct
sockaddr_in
saddr
;
long
port_num
=
0
;
#endif
int
ret
;
GIT_SOCKET
s
=
INVALID_SOCKET
;
...
...
@@ -397,6 +399,12 @@ int gitno_connect(git_transport *t, const char *host, const char *port)
}
#else
hent
=
gethostbyname
(
host
);
sent
=
getservbyname
(
port
,
0
);
if
(
sent
)
port_num
=
sent
->
s_port
;
else
port_num
=
atol
(
port
);
#endif
#ifndef __amigaos4__
...
...
@@ -413,9 +421,9 @@ int gitno_connect(git_transport *t, const char *host, const char *port)
#ifndef __amigaos4__
if
(
connect
(
s
,
p
->
ai_addr
,
(
socklen_t
)
p
->
ai_addrlen
)
==
0
)
#else
saddr
.
sin_addr
.
s_addr
=
*
hent
->
h_addr_list
[
p
]
;
memcpy
(
&
saddr
.
sin_addr
,
hent
->
h_addr_list
[
p
],
hent
->
h_length
)
;
saddr
.
sin_family
=
hent
->
h_addrtype
;
saddr
.
sin_port
=
port
;
saddr
.
sin_port
=
port
_num
;
if
(
connect
(
s
,
(
struct
sockaddr
*
)
&
saddr
,
sizeof
(
struct
sockaddr_in
))
==
0
)
#endif
break
;
...
...
src/path.c
View file @
c3fad0ae
...
...
@@ -482,9 +482,14 @@ int git_path_cmp(
/* Taken from git.git */
GIT_INLINE
(
int
)
is_dot_or_dotdot
(
const
char
*
name
)
{
#ifdef __amigaos4__
/* This is irrelevant on AmigaOS */
return
0
;
#else
return
(
name
[
0
]
==
'.'
&&
(
name
[
1
]
==
'\0'
||
(
name
[
1
]
==
'.'
&&
name
[
2
]
==
'\0'
)));
#endif
}
int
git_path_direach
(
...
...
@@ -512,7 +517,11 @@ int git_path_direach(
de_buf
=
git__malloc
(
sizeof
(
struct
dirent
));
#endif
#ifdef __amigaos4__
while
(
de
=
readdir
(
dir
))
{
#else
while
(
p_readdir_r
(
dir
,
de_buf
,
de
)
==
0
&&
de
!=
NULL
)
{
#endif
int
result
;
if
(
is_dot_or_dotdot
(
de
->
d_name
))
...
...
src/ppc/sha1ppc.S.obj
0 → 100644
View file @
c3fad0ae
File added
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