Skip to content
Permalink
Browse files

Merge pull request #1334 from max630/mingw-direct-CreateHardLinkW

mingw: use CreateHardLink directly
  • Loading branch information...
dscho committed Oct 28, 2017
2 parents dbc8d81 + e9630ae commit 07f905cec28d18030976ef5959426b20885a1ce4
Showing with 0 additions and 5 deletions.
  1. +0 −5 compat/mingw.c
@@ -2698,13 +2698,8 @@ int mingw_raise(int sig)

int link(const char *oldpath, const char *newpath)
{
DECLARE_PROC_ADDR(kernel32.dll, BOOL, CreateHardLinkW,
LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES);
wchar_t woldpath[MAX_LONG_PATH], wnewpath[MAX_LONG_PATH];

if (!INIT_PROC_ADDR(CreateHardLinkW))
return -1;

if (xutftowcs_long_path(woldpath, oldpath) < 0 ||
xutftowcs_long_path(wnewpath, newpath) < 0)
return -1;

0 comments on commit 07f905c

Please sign in to comment.
You can’t perform that action at this time.