PostgreSQL Source Code
git master
win32link.c
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* win32link.c
4
*
5
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
6
* Portions Copyright (c) 1994, Regents of the University of California
7
*
8
*
9
* IDENTIFICATION
10
* src/port/win32link.c
11
*
12
*-------------------------------------------------------------------------
13
*/
14
15
#include "
c.h
"
16
17
int
18
link
(
const
char
*src,
const
char
*dst)
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
}
c.h
_dosmaperr
void _dosmaperr(unsigned long)
Definition:
win32error.c:177
link
int link(const char *src, const char *dst)
Definition:
win32link.c:18
src
port
win32link.c
Generated on Wed Sep 18 2024 00:13:27 for PostgreSQL Source Code by
1.9.1