#ifdef EAI_BADHINTS and EAI_PROTOCOL which don't seem available on my system (Linux/glibc 2.11)

This commit is contained in:
Matthew Wild 2011-04-08 14:11:37 +01:00 committed by Sam Roberts
parent 2778766d67
commit dd83e0a849

View File

@ -374,14 +374,18 @@ const char *socket_gaistrerror(int err) {
switch (err) { switch (err) {
case EAI_AGAIN: return "temporary failure in name resolution"; case EAI_AGAIN: return "temporary failure in name resolution";
case EAI_BADFLAGS: return "invalid value for ai_flags"; case EAI_BADFLAGS: return "invalid value for ai_flags";
#ifdef EAI_BADHINTS
case EAI_BADHINTS: return "invalid value for hints"; case EAI_BADHINTS: return "invalid value for hints";
#endif
case EAI_FAIL: return "non-recoverable failure in name resolution"; case EAI_FAIL: return "non-recoverable failure in name resolution";
case EAI_FAMILY: return "ai_family not supported"; case EAI_FAMILY: return "ai_family not supported";
case EAI_MEMORY: return "memory allocation failure"; case EAI_MEMORY: return "memory allocation failure";
case EAI_NONAME: case EAI_NONAME:
return "hostname or servname not provided, or not known"; return "hostname or servname not provided, or not known";
case EAI_OVERFLOW: return "argument buffer overflow"; case EAI_OVERFLOW: return "argument buffer overflow";
#ifdef EAI_PROTOCOL
case EAI_PROTOCOL: return "resolved protocol is unknown"; case EAI_PROTOCOL: return "resolved protocol is unknown";
#endif
case EAI_SERVICE: return "servname not supported for socktype"; case EAI_SERVICE: return "servname not supported for socktype";
case EAI_SOCKTYPE: return "ai_socktype not supported"; case EAI_SOCKTYPE: return "ai_socktype not supported";
case EAI_SYSTEM: return strerror(errno); case EAI_SYSTEM: return strerror(errno);