Skip to content

Commit 7757399

Browse files
committed
Merge pull request #1334 from max630/mingw-direct-CreateHardLinkW
mingw: use CreateHardLink directly
2 parents a01cdb8 + 05163e3 commit 7757399

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

compat/mingw.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,13 +2666,8 @@ int mingw_raise(int sig)
26662666

26672667
int link(const char *oldpath, const char *newpath)
26682668
{
2669-
DECLARE_PROC_ADDR(kernel32.dll, BOOL, CreateHardLinkW,
2670-
LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES);
26712669
wchar_t woldpath[MAX_LONG_PATH], wnewpath[MAX_LONG_PATH];
26722670

2673-
if (!INIT_PROC_ADDR(CreateHardLinkW))
2674-
return -1;
2675-
26762671
if (xutftowcs_long_path(woldpath, oldpath) < 0 ||
26772672
xutftowcs_long_path(wnewpath, newpath) < 0)
26782673
return -1;

0 commit comments

Comments
 (0)