diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-18 21:59:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-18 21:59:11 -0700 |
commit | 578183bcb0fd30b7a36b98b714de96220793e712 (patch) | |
tree | fe34ca7c397d1ad49000624b7e5c59ccfa46a6ad /compat | |
parent | 54633cd53bf22672aed900a2a9df5d4f92548091 (diff) | |
parent | f64943d242d3b0fff40684d09033f17bb9747a38 (diff) | |
download | git-578183bcb0fd30b7a36b98b714de96220793e712.tar.gz |
Merge branch 'pt/mingw-misc-fixes'
* pt/mingw-misc-fixes:
t9901: fix line-ending dependency on windows
mingw: ensure sockets are initialized before calling gethostname
mergetools: use the correct tool for Beyond Compare 3 on Windows
t9300: do not run --cat-blob-fd related tests on MinGW
git-svn: On MSYS, escape and quote SVN_SSH also if set by the user
t9001: do not fail only due to CR/LF issues
t1020: disable the pwd test on MinGW
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 7 | ||||
-rw-r--r-- | compat/mingw.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 8947418ce7..efdc703257 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1321,6 +1321,13 @@ static void ensure_socket_initialization(void) initialized = 1; } +#undef gethostname +int mingw_gethostname(char *name, int namelen) +{ + ensure_socket_initialization(); + return gethostname(name, namelen); +} + #undef gethostbyname struct hostent *mingw_gethostbyname(const char *host) { diff --git a/compat/mingw.h b/compat/mingw.h index ce9dd980eb..fecf0d0776 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -190,6 +190,9 @@ char *mingw_getcwd(char *pointer, int len); char *mingw_getenv(const char *name); #define getenv mingw_getenv +int mingw_gethostname(char *host, int namelen); +#define gethostname mingw_gethostname + struct hostent *mingw_gethostbyname(const char *host); #define gethostbyname mingw_gethostbyname |