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
3f31ce8d
Commit
3f31ce8d
authored
Jan 10, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1218 from sba1/amiga.2
Libgit2 for AmigaOS4
parents
a22ad9fd
ccd298bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
.gitignore
+1
-0
CMakeLists.txt
+5
-3
src/amiga/map.c
+1
-1
No files found.
.gitignore
View file @
3f31ce8d
...
...
@@ -14,6 +14,7 @@
.lock-wafbuild
.waf*
build/
build-amiga/
tests/tmp/
msvc/Debug/
msvc/Release/
...
...
CMakeLists.txt
View file @
3f31ce8d
...
...
@@ -88,7 +88,9 @@ INCLUDE_DIRECTORIES(src include)
IF
(
WIN32 AND NOT MINGW
)
ADD_DEFINITIONS
(
-DGIT_WINHTTP
)
ELSE
()
FIND_PACKAGE
(
OpenSSL
)
IF
(
NOT AMIGA
)
FIND_PACKAGE
(
OpenSSL
)
ENDIF
()
FILE
(
GLOB SRC_HTTP deps/http-parser/*.c
)
INCLUDE_DIRECTORIES
(
deps/http-parser
)
ENDIF
()
...
...
@@ -104,7 +106,7 @@ ELSE()
ENDIF
()
# Include POSIX regex when it is required
IF
(
WIN32 OR
CMAKE_SYSTEM_NAME STREQUAL
"AmigaOS"
)
IF
(
WIN32 OR
AMIGA
)
INCLUDE_DIRECTORIES
(
deps/regex
)
SET
(
SRC_REGEX deps/regex/regex.c
)
ENDIF
()
...
...
@@ -144,7 +146,7 @@ ELSE ()
SET
(
CMAKE_C_FLAGS
"-D_GNU_SOURCE -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes
${
CMAKE_C_FLAGS
}
"
)
IF
(
MINGW
)
# MinGW always does PIC and complains if we tell it to
STRING
(
REGEX REPLACE
"-fPIC"
""
CMAKE_SHARED_LIBRARY_C_FLAGS
"
${
CMAKE_SHARED_LIBRARY_C_FLAGS
}
"
)
ELSE
(
)
ELSE
IF
(
BUILD_SHARED_LIBS
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fvisibility=hidden -fPIC"
)
ENDIF
()
IF
(
APPLE
)
# Apple deprecated OpenSSL
...
...
src/amiga/map.c
View file @
3f31ce8d
...
...
@@ -27,7 +27,7 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs
out
->
data
=
malloc
(
len
);
GITERR_CHECK_ALLOC
(
out
->
data
);
if
(
p_lseek
(
fd
,
offset
,
SEEK_SET
)
<
0
||
p_read
(
fd
,
out
->
data
,
len
)
!=
len
)
if
(
(
p_lseek
(
fd
,
offset
,
SEEK_SET
)
<
0
)
||
((
size_t
)
p_read
(
fd
,
out
->
data
,
len
)
!=
len
))
{
giterr_set
(
GITERR_OS
,
"mmap emulation failed"
);
return
-
1
;
}
...
...
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