cmSystemTools: Improve CreateLink and CreateSymlink error codes
In commit 7f890539 from !6007 (merged) we just took the -err
from libuv and treated it as a POSIX error. This is accurate on POSIX, but on Windows does not match the POSIX error codes.
Use uv_fs_get_system_error
to get the actual system error code. This requires libuv 1.38 or higher. Require that for Windows, but fall back to the previous approach on POSIX.
Edited by Brad King