]> git.proxmox.com Git - libgit2.git/blob - src/unix/posix.h
Merge pull request #1080 from carlosmn/config-set-null
[libgit2.git] / src / unix / posix.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_posix__w32_h__
8 #define INCLUDE_posix__w32_h__
9
10 #include <stdio.h>
11 #include <sys/param.h>
12
13 #define p_lstat(p,b) lstat(p,b)
14 #define p_readlink(a, b, c) readlink(a, b, c)
15 #define p_symlink(o,n) symlink(o, n)
16 #define p_link(o,n) link(o, n)
17 #define p_unlink(p) unlink(p)
18 #define p_mkdir(p,m) mkdir(p, m)
19 #define p_fsync(fd) fsync(fd)
20
21 /* The OpenBSD realpath function behaves differently */
22 #if !defined(__OpenBSD__)
23 # define p_realpath(p, po) realpath(p, po)
24 #endif
25
26 #define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a)
27 #define p_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__)
28 #define p_mkstemp(p) mkstemp(p)
29 #define p_setenv(n,v,o) setenv(n,v,o)
30 #define p_inet_pton(a, b, c) inet_pton(a, b, c)
31
32 /* see win32/posix.h for explanation about why this exists */
33 #define p_lstat_posixly(p,b) lstat(p,b)
34
35 #endif