Artifact e284289b62e6fea386b76477351618e664ef3444:
- File link.c — part of check-in [8064ab3d35] at 2005-08-23 20:58:43 on branch trunk — Updated stub link() replacement to work under Win32 (in NT5 and up) (user: rkeene size: 332)
#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