Skip to content

AmigaOS 4 compatibility patches #766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 22, 2012
Merged

AmigaOS 4 compatibility patches #766

merged 5 commits into from
Jun 22, 2012

Conversation

chris-y
Copy link
Contributor

@chris-y chris-y commented Jun 13, 2012

This patch enables libgit2 to be compiled and used on AmigaOS 4.

@travisbot
Copy link

This pull request passes (merged 17b45d8 into 86ea6ce).

@@ -486,9 +486,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 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if this is irrelevant, is there a need to #ifdef it out or can we just leave it? I don't think git is going to let you add a file named "." or ".." so having those files show up in direach() or dirload() call is just going to cause issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to remove that #ifdef... absolutely, it doesn't need to be there.

@travisbot
Copy link

This pull request passes (merged a47cfd2 into 86ea6ce).

@travisbot
Copy link

This pull request passes (merged 28606ff into 86ea6ce).

struct addrinfo *info = NULL, *p;
#else
int p;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following... You've defined struct addrinfo before, why don't you use it here?

@vmg
Copy link
Member

vmg commented Jun 20, 2012

Looks good, besides all the conditional network compilation. We need to drop that; you've already defined the struct addrinfo, so use it whenever possible.

@travisbot
Copy link

This pull request passes (merged db5a6ec into 86ea6ce).

@chris-y
Copy link
Contributor Author

chris-y commented Jun 20, 2012

I've dropped the conditional network stuff and implemented my own replacement getaddrinfo() functions. This means there is now one block at the top of the file for NO_ADDRINFO and the rest unchanged.

@vmg vmg merged commit db5a6ec into libgit2:development Jun 22, 2012
@vmg
Copy link
Member

vmg commented Jun 22, 2012

✨ MERGED ✨

Can you verify that this still runs under AmigaOS after the cleanup?

@chris-y
Copy link
Contributor Author

chris-y commented Jun 24, 2012

There's an include missing. Other than that, working perfectly, thanks.

diff --git a/src/posix.h b/src/posix.h
index 76f3b94..8aac0cc 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -96,6 +96,8 @@ GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, s
 #endif

 #ifdef NO_ADDRINFO
+#include <netdb.h>
+
 struct addrinfo {
        struct hostent *ai_hostent;
        struct servent *ai_servent;

@vmg
Copy link
Member

vmg commented Jun 24, 2012

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants