]> err.no Git - backuppcd/blob - link.c
Import gnulib stuff
[backuppcd] / link.c
1 #include "compat.h"
2 #include "link.h"
3
4 #ifndef HAVE_LINK
5
6 int link(const char *oldpath, const char *newpath) {
7         int retval = -1;
8 #ifdef _USE_WIN32_
9 #  if (_WIN32_WINNT >= 0x0500)
10         BOOL chl_retval;
11
12         chl_retval = CreateHardLink(newpath, oldpath, NULL);
13
14         if (chl_retval) {
15                 retval = 0;
16         }
17 #  endif
18 #endif
19         return(retval);
20 }
21
22 #endif