diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-06-16 01:22:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-16 01:22:10 -0700 |
commit | 5bd148bfe8a4f2df8487e029cd4ee6809bc4c963 (patch) | |
tree | 1960d9d9011cb728631b357c928745b42d096eda /compat | |
parent | c5f71ad09994b46d80878ce72d1ca6f59935d952 (diff) | |
parent | c7c84859ad586ae5670224e1abc4f846f7c3a9ae (diff) | |
download | git-5bd148bfe8a4f2df8487e029cd4ee6809bc4c963.tar.gz git-5bd148bfe8a4f2df8487e029cd4ee6809bc4c963.tar.xz |
Merge branch 'maint' to sync with GIT 1.5.2.2
Diffstat (limited to 'compat')
-rw-r--r-- | compat/hstrerror.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/compat/hstrerror.c b/compat/hstrerror.c new file mode 100644 index 000000000..069c555da --- /dev/null +++ b/compat/hstrerror.c @@ -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; +} |