Artifact [e284289b62]

Artifact e284289b62e6fea386b76477351618e664ef3444:


#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