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 <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2017-05-30 22:26:43 +02:00
parent 51efe4db88
commit e8f13ee97e

View File

@@ -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,