]>
Commit | Line | Data |
---|---|---|
bb742ede | 1 | /* |
5e0de328 | 2 | * Copyright (C) 2009-2012 the libgit2 contributors |
bb742ede VM |
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" |
11d51ca6 | 12 | #include "utf-conv.h" |
f79026b4 VM |
13 | |
14 | GIT_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 | ||
33127043 | 22 | GIT_INLINE(int) p_mkdir(const char *path, mode_t GIT_UNUSED(mode)) |
f79026b4 | 23 | { |
11d51ca6 | 24 | wchar_t* buf = gitwin_to_utf16(path); |
7998ae5a PB |
25 | int ret = _wmkdir(buf); |
26 | ||
f79026b4 | 27 | GIT_UNUSED_ARG(mode) |
7998ae5a | 28 | |
3286c408 | 29 | git__free(buf); |
7998ae5a | 30 | return ret; |
f79026b4 VM |
31 | } |
32 | ||
33 | extern int p_unlink(const char *path); | |
34 | extern int p_lstat(const char *file_name, struct stat *buf); | |
35 | extern int p_readlink(const char *link, char *target, size_t target_len); | |
36 | extern int p_hide_directory__w32(const char *path); | |
19ac1ed7 | 37 | extern char *p_realpath(const char *orig_path, char *buffer); |
2fc78e70 | 38 | extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr); |
84dd3820 | 39 | extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4); |
f978b748 | 40 | extern int p_mkstemp(char *tmp_path); |
222d057c | 41 | extern int p_setenv(const char* name, const char* value, int overwrite); |
7998ae5a PB |
42 | extern int p_stat(const char* path, struct stat* buf); |
43 | extern int p_chdir(const char* path); | |
33127043 | 44 | extern int p_chmod(const char* path, mode_t mode); |
7998ae5a | 45 | extern int p_rmdir(const char* path); |
33127043 | 46 | extern int p_access(const char* path, mode_t mode); |
6c8b458d VM |
47 | extern int p_fsync(int fd); |
48 | extern int p_open(const char *path, int flags); | |
33127043 | 49 | extern int p_creat(const char *path, mode_t mode); |
6c8b458d | 50 | extern int p_getcwd(char *buffer_out, size_t size); |
0c49ec2d | 51 | extern int p_rename(const char *from, const char *to); |
f79026b4 VM |
52 | |
53 | #endif |