summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Radchenko <marat@slonopotamus.org>2014-03-29 00:08:02 +0400
committerJunio C Hamano <gitster@pobox.com>2014-03-28 13:37:16 -0700
commit4b623d80f73528a632576990ca51e34c333d5dd6 (patch)
treed5a3bef407852949f0fc05801abf987d93db355e
parentcee0c2750bb5f1b38f15ef961517e03c2e39c9ec (diff)
downloadgit-4b623d80f73528a632576990ca51e34c333d5dd6.tar.gz
MSVC: link in invalidcontinue.obj for better POSIX compatibilitymr/msvc-link-with-invalidcontinue
By default, Windows abort()'s instead of setting errno=EINVAL when invalid arguments are passed to standard functions. For example, when PAGER quits and git detects it with errno=EPIPE on write(), check_pipe() in write_or_die.c tries raise(SIGPIPE) but since there is no SIGPIPE on Windows, it is treated as invalid argument, causing abort() and crash report window. Linking in invalidcontinue.obj (provided along with MS compiler) allows raise(SIGPIPE) to return with errno=EINVAL. Signed-off-by: Marat Radchenko <marat@slonopotamus.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--config.mak.uname2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.mak.uname b/config.mak.uname
index 7d31fad241..a62d9fd1e2 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -365,7 +365,7 @@ ifeq ($(uname_S),Windows)
compat/win32/dirent.o
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
- EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib
+ EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj
PTHREAD_LIBS =
lib =
ifndef DEBUG