From e9bb730c36a9bea6a96b77355f90fabe95fc503d Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 9 Nov 2012 06:02:30 +0100 Subject: [PATCH 1/5] Added missing curly brackets and fixed compiler warnings. --- src/amiga/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amiga/map.c b/src/amiga/map.c index 513e2f465..0ba7995c6 100644 --- a/src/amiga/map.c +++ b/src/amiga/map.c @@ -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; } From c57c4af327979ad4189b108eaf751c912c8dea01 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Sat, 29 Dec 2012 23:27:14 +0100 Subject: [PATCH 2/5] Disable SSL when compiling for AmigaOS for now. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87c0b3571..e8eb46eee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() From 707ede86335850a97aa1ec5aad9539dfa2e87b9c Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 4 Jan 2013 03:25:05 +0100 Subject: [PATCH 3/5] Compile regexp dependency when AMIGA is defined. Before it was compiled when CMake was actually run on AmigaOS. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8eb46eee..8dd4f0749 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,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() From b41e24a65c73c4ce052b02134ca559803400eecd Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 4 Jan 2013 13:02:47 +0100 Subject: [PATCH 4/5] Add -fPIC only if BUILD_SHARED_LIBS is ON --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dd4f0749..47533a282 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,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 () + ELSEIF (BUILD_SHARED_LIBS) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fPIC") ENDIF () IF (APPLE) # Apple deprecated OpenSSL From ccd298bb2237c2472ec7d956f05addfda7b1d890 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Fri, 4 Jan 2013 23:49:28 +0100 Subject: [PATCH 5/5] Ignore build-amiga --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0289813c8..949baec98 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ .lock-wafbuild .waf* build/ +build-amiga/ tests/tmp/ msvc/Debug/ msvc/Release/