I came across the HAVE_WORKING_LINK define in pg_config_manual.h. AFAICT, hard links are supported on Windows and Cygwin in the OS versions that we support, and pg_upgrade already contains the required shim. It seems to me we could normalize and simplify that, as in the attached patches. (Perhaps rename durable_link_or_rename() then.) I successfully tested on MSVC, MinGW, and Cygwin.
The link referenced in the comments of win32_pghardlink() [1] is quite old, and is automatically redirected to the current documentation [2]. Maybe this patch should use the new path.