Skip to content

Commit e8f13ee

Browse files
committed
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 <[email protected]>
1 parent 51efe4d commit e8f13ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ int mingw_core_config(const char *var, const char *value)
270270
return 0;
271271
}
272272

273-
DECLARE_PROC_ADDR(kernel32.dll, BOOL, CreateSymbolicLinkW, LPCWSTR, LPCWSTR, DWORD);
273+
DECLARE_PROC_ADDR(kernel32.dll, BOOLEAN, CreateSymbolicLinkW, LPCWSTR, LPCWSTR, DWORD);
274274

275275
enum phantom_symlink_result {
276276
PHANTOM_SYMLINK_RETRY,

0 commit comments

Comments
 (0)