Skip to content

Commit 4bbafff

Browse files
dschoGit for Windows Build Agent
authored andcommitted
windows: clarify the need for invalidcontinue.obj
Git's source code wants to be able to close() the same file descriptor multiple times, ignoring the error returned by the second call (and the ones after that), or to access the osfhandle of an already-closed stdout, among other things that the UCRT does not like. Simply linking invalidcontinue.obj allows such usage without resorting to Debug Assertions (or exiting with exit code 9 in Release Mode). Let's add a note so we don't forget, as suggested by Jeff Hostetler. See https://msdn.microsoft.com/en-us/library/ms235330.aspx for more details. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent f444352 commit 4bbafff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config.mak.uname

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ ifeq ($(uname_S),Windows)
406406
compat/win32/dirent.o compat/win32/fscache.o
407407
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
408408
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE
409+
# invalidcontinue.obj allows Git's source code to close the same file
410+
# handle twice, or to access the osfhandle of an already-closed stdout
411+
# See https://msdn.microsoft.com/en-us/library/ms235330.aspx
409412
EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj kernel32.lib ntdll.lib
410413
PTHREAD_LIBS =
411414
lib =

0 commit comments

Comments
 (0)