]> git.proxmox.com Git - libgit2.git/blame - src/win32/posix.h
Merge pull request #464 from rtyley/development
[libgit2.git] / src / win32 / posix.h
CommitLineData
bb742ede
VM
1/*
2 * Copyright (C) 2009-2011 the libgit2 contributors
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 */
f79026b4
VM
7#ifndef INCLUDE_posix__w32_h__
8#define INCLUDE_posix__w32_h__
9
10#include "common.h"
e9c6571d 11#include "fnmatch.h"
7998ae5a 12#include "utf8-conv.h"
f79026b4
VM
13
14GIT_INLINE(int) p_link(const char *GIT_UNUSED(old), const char *GIT_UNUSED(new))
15{
16 GIT_UNUSED_ARG(old)
17 GIT_UNUSED_ARG(new)
18 errno = ENOSYS;
19 return -1;
20}
21
22GIT_INLINE(int) p_mkdir(const char *path, int GIT_UNUSED(mode))
23{
7998ae5a
PB
24 wchar_t* buf = conv_utf8_to_utf16(path);
25 int ret = _wmkdir(buf);
26
f79026b4 27 GIT_UNUSED_ARG(mode)
7998ae5a
PB
28
29 free(buf);
30 return ret;
f79026b4
VM
31}
32
33extern int p_unlink(const char *path);
34extern int p_lstat(const char *file_name, struct stat *buf);
35extern int p_readlink(const char *link, char *target, size_t target_len);
36extern int p_hide_directory__w32(const char *path);
19ac1ed7 37extern char *p_realpath(const char *orig_path, char *buffer);
2fc78e70 38extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
84dd3820 39extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
f978b748 40extern int p_mkstemp(char *tmp_path);
222d057c 41extern int p_setenv(const char* name, const char* value, int overwrite);
7998ae5a
PB
42extern int p_stat(const char* path, struct stat* buf);
43extern int p_chdir(const char* path);
44extern int p_chmod(const char* path, int mode);
45extern int p_rmdir(const char* path);
dd44887a 46extern int p_access(const char* path, int mode);
6c8b458d
VM
47extern int p_fsync(int fd);
48extern int p_open(const char *path, int flags);
49extern int p_creat(const char *path, int mode);
50extern int p_getcwd(char *buffer_out, size_t size);
f79026b4
VM
51
52#endif