File link.c from the latest check-in
#include "compat.h" #include "link.h" #ifndef HAVE_LINK int link(const char *oldpath, const char *newpath) { int retval = -1; #ifdef _USE_WIN32_ # if (_WIN32_WINNT >= 0x0500) BOOL chl_retval; chl_retval = CreateHardLink(newpath, oldpath, NULL); if (chl_retval) { retval = 0; } # endif #endif return(retval); } #endif