diff options
| author | Jacques Germishuys <jacquesg@striata.com> | 2014-07-12 14:45:56 +0200 |
|---|---|---|
| committer | Jacques Germishuys <jacquesg@striata.com> | 2014-08-05 20:51:59 +0200 |
| commit | 2f795d8fc50d81641d95723d9ddd92795886bed3 (patch) | |
| tree | 906e6feb62306a9ee2aaaf3abc3aa1f15645c7ba /src/win32/posix_w32.c | |
| parent | d07fd4425f654825099729e1caa2b3b25341a91d (diff) | |
| download | libgit2-2f795d8fc50d81641d95723d9ddd92795886bed3.tar.gz | |
Cleanup portability/compatibility layer
* Removes mingw-compat.h
* Cleans up separation of compiler/platform idiosyncrasies
* Unifies mingw/msvc stat structures and functions
* (Tries to) hide more compiler specific implementation details (even in our internal API)
Diffstat (limited to 'src/win32/posix_w32.c')
| -rw-r--r-- | src/win32/posix_w32.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index a74fcaad1..7df8100ca 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -51,6 +51,15 @@ static int utf8_to_16_with_errno(git_win32_path dest, const char *src) return len; } +int p_ftruncate(int fd, long size) +{ +#if defined(_MSC_VER) && _MSC_VER >= 1500 + return _chsize_s(fd, size); +#else + return _chsize(fd, size); +#endif +} + int p_mkdir(const char *path, mode_t mode) { git_win32_path buf; @@ -63,6 +72,14 @@ int p_mkdir(const char *path, mode_t mode) return _wmkdir(buf); } +int p_link(const char *old, const char *new) +{ + GIT_UNUSED(old); + GIT_UNUSED(new); + errno = ENOSYS; + return -1; +} + int p_unlink(const char *path) { git_win32_path buf; |
