diff options
author | Vicent Marti <tanoku@gmail.com> | 2012-06-22 23:25:17 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2012-06-22 23:25:17 +0400 |
commit | 798e4d53dcd2f5340782083130c0fb5227d596ac (patch) | |
tree | 8728939b3b0635833c36de2b0805e77464e50c28 /src/posix.h | |
parent | 2ae052d1b1574d1a4de402c91ebb98f061c997d4 (diff) |
amigaos: Cleanup
Diffstat (limited to 'src/posix.h')
-rw-r--r-- | src/posix.h | 32 |
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 |