Merge branch 'maint' to sync with GIT 1.5.2.2

This commit is contained in:
Junio C Hamano
2007-06-16 01:22:10 -07:00
10 changed files with 109 additions and 6 deletions

21
compat/hstrerror.c Normal file
View File

@@ -0,0 +1,21 @@
#include <string.h>
#include <stdio.h>
#include <netdb.h>
const char *githstrerror(int err)
{
static char buffer[48];
switch (err)
{
case HOST_NOT_FOUND:
return "Authoritative answer: host not found";
case NO_DATA:
return "Valid name, no data record of requested type";
case NO_RECOVERY:
return "Non recoverable errors, FORMERR, REFUSED, NOTIMP";
case TRY_AGAIN:
return "Non-authoritative \"host not found\", or SERVERFAIL";
}
sprintf(buffer, "Name resolution error %d", err);
return buffer;
}