From e8f13ee97ec1f09867c30eb598531260b53cb7de Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 30 May 2017 22:26:43 +0200 Subject: [PATCH] fixup! Win32: implement basic symlink() functionality (file symlinks only) This patch fixes signature of the CreateSymbolicLinkW() function's declaratoin. The previous declaration claimed that said function returns a BOOL, while it really returns a BOOLEAN. This is not an academic distinction: BOOL is defined as an int (i.e. 32-bit) and BOOLEAN as an unsigned char (i.e. 8-bit). Therefore, the return value 0 (meaning, the least-significant 8 bits are all zero) could be mistaken to indicate a successful creation of the symbolic link (because the remaining 24 bits are undefined, and quite likely non-zero). Signed-off-by: Johannes Schindelin --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 1898a012e7..7b930e90e3 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -270,7 +270,7 @@ int mingw_core_config(const char *var, const char *value) return 0; } -DECLARE_PROC_ADDR(kernel32.dll, BOOL, CreateSymbolicLinkW, LPCWSTR, LPCWSTR, DWORD); +DECLARE_PROC_ADDR(kernel32.dll, BOOLEAN, CreateSymbolicLinkW, LPCWSTR, LPCWSTR, DWORD); enum phantom_symlink_result { PHANTOM_SYMLINK_RETRY,