diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2007-06-13 20:54:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-15 22:48:34 -0700 |
commit | fa0c87c34471286b6c261c781a45ed090135295c (patch) | |
tree | 083fd345b588cc495a7acad8b2cd07c3d516b364 /git-compat-util.h | |
parent | 18a936805e82d769e33ea0dd866f8fe12ef1827e (diff) | |
download | git-fa0c87c34471286b6c261c781a45ed090135295c.tar.gz git-fa0c87c34471286b6c261c781a45ed090135295c.tar.xz |
Add a local implementation of hstrerror for the system which do not have it
The function converts the value of h_errno (last error of name
resolver library, see netdb.h).
One of systems which supposedly do not have the function is SunOS.
POSIX does not mandate its presence.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 6bd8987b2..b2ab3f825 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -167,6 +167,11 @@ extern size_t gitstrlcpy(char *, const char *, size_t); extern uintmax_t gitstrtoumax(const char *, char **, int); #endif +#ifdef NO_HSTRERROR +#define hstrerror githstrerror +extern const char *githstrerror(int herror); +#endif + extern void release_pack_memory(size_t, int); static inline char* xstrdup(const char *str) |