PostgreSQL Source Code  git master
win32link.c File Reference
#include "c.h"
Include dependency graph for win32link.c:

Go to the source code of this file.

Functions

int link (const char *src, const char *dst)
 

Function Documentation

◆ link()

int link ( const char *  src,
const char *  dst 
)

Definition at line 18 of file win32link.c.

19 {
20  /*
21  * CreateHardLinkA returns zero for failure
22  * https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createhardlinka
23  */
24  if (CreateHardLinkA(dst, src, NULL) == 0)
25  {
26  _dosmaperr(GetLastError());
27  return -1;
28  }
29  else
30  return 0;
31 }
void _dosmaperr(unsigned long)
Definition: win32error.c:177

References _dosmaperr().

Referenced by AllocSetAllocFromNewBlock(), AllocSetFree(), check_hard_link(), and linkFile().