EAI_SYSTEM and ECANCELED are undefined under cygwin; added

conditional #define.
This commit is contained in:
Abdulaziz Ghuloum 2008-06-08 23:15:25 -07:00
parent c53ffd5314
commit e9ecb1b8b0
3 changed files with 11 additions and 2 deletions

View File

@ -27,6 +27,10 @@ typedef struct errno_info {
ikptr c;
} errno_info;
#ifndef ECANCELED
#define ECANCELED 140
#endif
static errno_info errno_table[] = {
/* errnos from POSIX IEEE Std 1003.1 2004 Edition */
{E2BIG, "E2BIG", fix(-1)},

View File

@ -57,7 +57,7 @@ getaddrinfo(const char *hostname, const char* servname,
memcpy(&sa_in->sin_addr, *ap, sizeof(struct in_addr));
r->ai_next = NULL;
*res = r;
return (0);
return 0;
}
void

View File

@ -40,5 +40,10 @@ getaddrinfo(const char *hostname, const char* servname,
extern void
freeaddrinfo(struct addrinfo *ai);
#ifndef EAI_SYSTEM
# define EAI_SYSTEM 11 /* same code as in glibc */
#endif
#endif