summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-06-23 18:13:29 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2019-11-25 13:18:29 +1100
commit6460e8abcfda7692af9bd267bddf6e11a78f8130 (patch)
treec1b53835ff0e9a29c332f98ba6952df3640cebce /src/win32
parent05237ee559486ae4416f3d12e4a422bd9183f7ea (diff)
downloadlibgit2-ethomson/off_t.tar.gz
internal: use off64_t instead of git_off_tethomson/off_t
Prefer `off64_t` internally.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/posix.h2
-rw-r--r--src/win32/posix_w32.c2
-rw-r--r--src/win32/w32_util.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/win32/posix.h b/src/win32/posix.h
index e427d64c3..f115088b4 100644
--- a/src/win32/posix.h
+++ b/src/win32/posix.h
@@ -47,7 +47,7 @@ extern int p_chdir(const char* path);
extern int p_chmod(const char* path, mode_t mode);
extern int p_rmdir(const char* path);
extern int p_access(const char* path, mode_t mode);
-extern int p_ftruncate(int fd, git_off_t size);
+extern int p_ftruncate(int fd, off64_t size);
/* p_lstat is almost but not quite POSIX correct. Specifically, the use of
* ENOTDIR is wrong, in that it does not mean precisely that a non-directory
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index 078b50952..2bc93a3c7 100644
--- a/src/win32/posix_w32.c
+++ b/src/win32/posix_w32.c
@@ -210,7 +210,7 @@ on_error:
* We now take a "git_off_t" rather than "long" because
* files may be longer than 2Gb.
*/
-int p_ftruncate(int fd, git_off_t size)
+int p_ftruncate(int fd, off64_t size)
{
if (size < 0) {
errno = EINVAL;
diff --git a/src/win32/w32_util.h b/src/win32/w32_util.h
index ac191157c..d7f9d3da6 100644
--- a/src/win32/w32_util.h
+++ b/src/win32/w32_util.h
@@ -120,7 +120,7 @@ GIT_INLINE(void) git_win32__stat_init(
st->st_uid = 0;
st->st_nlink = 1;
st->st_mode = mode;
- st->st_size = ((git_off_t)nFileSizeHigh << 32) + nFileSizeLow;
+ st->st_size = ((int64_t)nFileSizeHigh << 32) + nFileSizeLow;
st->st_dev = _getdrive() - 1;
st->st_rdev = st->st_dev;
git_win32__filetime_to_timespec(&ftLastAccessTime, &(st->st_atim));