]> git.proxmox.com Git - libgit2.git/commitdiff
OS4 compatibility
authorChris Young <chris@unsatisfactorysoftware.co.uk>
Fri, 8 Jun 2012 17:57:35 +0000 (18:57 +0100)
committerChris Young <chris@unsatisfactorysoftware.co.uk>
Fri, 8 Jun 2012 17:57:35 +0000 (18:57 +0100)
include/git2/common.h
src/path.c
src/posix.h

index 4e6c2a57e875ee6d4a88ecb98378128671f8637a..b692c67e2fde503595fea809933646aa4fe51713 100644 (file)
@@ -107,6 +107,8 @@ GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
  */
 GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
 
+GIT_EXTERN(int) p_fnmatch(const char *pattern, const char *string, int flags);
+
 /** @} */
 GIT_END_DECL
 #endif
index 84edf6d890df127526d7eeccc4a56c691c1c9264..056b6b91067b6357da688b93e2dac5567ce801ba 100644 (file)
@@ -512,7 +512,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))
@@ -570,7 +570,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;
 
index d020d94ac5905cac7b837bfb2eb35b8a6c834abd..8e8b394c8c90ca88ed00ce3e35f46732c02e1a24 100644 (file)
@@ -74,6 +74,10 @@ typedef SOCKET GIT_SOCKET;
 #      include "unix/posix.h"
 #endif
 
-#define p_readdir_r(d,e,r) readdir_r(d,e,r)
+#ifndef __amigaos4__
+#define p_readdir_r(d,e,r) readdir_r(d,e,&r)
+#else
+#define p_readdir_r(d,e,r) r = readdir(d)
+#endif
 
 #endif