Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2012-06-22 23:25:17 +0400
committerVicent Marti <tanoku@gmail.com>2012-06-22 23:25:17 +0400
commit798e4d53dcd2f5340782083130c0fb5227d596ac (patch)
tree8728939b3b0635833c36de2b0805e77464e50c28 /src/posix.h
parent2ae052d1b1574d1a4de402c91ebb98f061c997d4 (diff)
amigaos: Cleanup
Diffstat (limited to 'src/posix.h')
-rw-r--r--src/posix.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/posix.h b/src/posix.h
index d423b7e07..76f3b942e 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -83,16 +83,40 @@ extern int p_gettimeofday(struct timeval *tv, struct timezone *tz);
# include "unix/posix.h"
#endif
-#ifndef NO_READDIR_R
-#define p_readdir_r(d,e,r) readdir_r(d,e,r)
-#else
-#include <dirent.h>
+#ifdef NO_READDIR_R
+# include <dirent.h>
GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
{
GIT_UNUSED(entry);
*result = readdir(dirp);
return 0;
}
+#else /* NO_READDIR_R */
+# define p_readdir_r(d,e,r) readdir_r(d,e,r)
#endif
+#ifdef NO_ADDRINFO
+struct addrinfo {
+ struct hostent *ai_hostent;
+ struct servent *ai_servent;
+ struct sockaddr_in ai_addr_in;
+ struct sockaddr *ai_addr;
+ size_t ai_addrlen;
+ int ai_family;
+ int ai_socktype;
+ int ai_protocol;
+ long ai_port;
+ struct addrinfo *ai_next;
+};
+
+extern int p_getaddrinfo(const char *host, const char *port,
+ struct addrinfo *hints, struct addrinfo **info);
+extern void p_freeaddrinfo(struct addrinfo *info);
+extern const char *p_gai_strerror(int ret);
+#else
+# define p_getaddrinfo(a, b, c, d) getaddrinfo(a, b, c, d)
+# define p_freeaddrinfo(a) freeaddrinfo(a)
+# define p_gai_strerror(c) gai_strerror(c)
+#endif /* NO_ADDRINFO */
+
#endif