merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4' as 'third_party/git'
This commit is contained in:
commit
7ef0d62730
3629 changed files with 1139935 additions and 0 deletions
21
third_party/git/compat/hstrerror.c
vendored
Normal file
21
third_party/git/compat/hstrerror.c
vendored
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";
|
||||
}
|
||||
snprintf(buffer, sizeof(buffer), "Name resolution error %d", err);
|
||||
return buffer;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue