mirror of
https://github.com/git/git.git
synced 2026-04-11 09:20:10 +02:00
Merge branch 'maint' to sync with GIT 1.5.2.2
This commit is contained in:
21
compat/hstrerror.c
Normal file
21
compat/hstrerror.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user