More changes resulting from pull request
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
diff --git a/README.amiga b/README.amiga
deleted file mode 100755
index 97414dd..0000000
--- a/README.amiga
+++ /dev/null
@@ -1,4 +0,0 @@
-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
diff --git a/src/amiga/map.c b/src/amiga/map.c
index 643e6c6..2fb065c 100755
--- a/src/amiga/map.c
+++ b/src/amiga/map.c
@@ -14,9 +14,6 @@
int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset)
{
- int mprot = 0;
- int mflag = 0;
-
GIT_MMAP_VALIDATE(out, len, prot, flags);
out->data = NULL;
@@ -27,12 +24,12 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs
return -1;
}
- if(out->data = malloc(len)) {
+ if((out->data = malloc(len))) {
p_lseek(fd, offset, SEEK_SET);
p_read(fd, out->data, len);
}
- if (!out->data || out->data == MAP_FAILED) {
+ if (!out->data || (out->data == MAP_FAILED)) {
giterr_set(GITERR_OS, "Failed to mmap. Could not write data");
return -1;
}
diff --git a/src/netops.c b/src/netops.c
index 166c971..98b5035 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -430,7 +430,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port)
#else
memcpy(&hints.ai_addr.sin_addr, hints.ai_hostent->h_addr_list[p], hints.ai_hostent->h_length);
hints.ai_addr.sin_family = hints.ai_hostent->h_addrtype;
- hints.ai_addr.sin_port = honts.ai_port;
+ hints.ai_addr.sin_port = hints.ai_port;
if (connect(s, (struct sockaddr *)&hints.ai_addr, sizeof(struct sockaddr_in)) == 0)
#endif
break;
diff --git a/src/path.c b/src/path.c
index bd659f8..1d85559 100644
--- a/src/path.c
+++ b/src/path.c
@@ -516,7 +516,7 @@ int git_path_direach(
de_buf = git__malloc(sizeof(struct dirent));
#endif
- while (p_readdir_r(dir, de_buf, de) == 0 && de != NULL) {
+ while (p_readdir_r(dir, de_buf, &de) == 0 && de != NULL) {
int result;
if (is_dot_or_dotdot(de->d_name))
@@ -574,7 +574,7 @@ int git_path_dirload(
path_len -= prefix_len;
need_slash = (path_len > 0 && path[path_len-1] != '/') ? 1 : 0;
- while ((error = p_readdir_r(dir, de_buf, de)) == 0 && de != NULL) {
+ while ((error = p_readdir_r(dir, de_buf, &de)) == 0 && de != NULL) {
char *entry_path;
size_t entry_len;
diff --git a/src/posix.h b/src/posix.h
index cc35c52..d423b7e 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -84,9 +84,10 @@ extern int p_gettimeofday(struct timeval *tv, struct timezone *tz);
#endif
#ifndef NO_READDIR_R
-#define p_readdir_r(d,e,r) readdir_r(d,e,&r)
+#define p_readdir_r(d,e,r) readdir_r(d,e,r)
#else
-GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct direct **result)
+#include <dirent.h>
+GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
{
GIT_UNUSED(entry);
*result = readdir(dirp);
diff --git a/src/ppc/sha1ppc.S.obj b/src/ppc/sha1ppc.S.obj
deleted file mode 100644
index a7dad60..0000000
Binary files a/src/ppc/sha1ppc.S.obj and /dev/null differ