diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-19 21:25:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-19 21:25:48 -0700 |
commit | 55e839e378416b70720308e86439e2ad6ecccc4a (patch) | |
tree | 7a1b3c7de312a3debae53eb7a7fb5a52aa1d3e4e /git-compat-util.h | |
parent | 6457e58c8fc00ef1c72724dad5f8baf54cfee5a2 (diff) | |
parent | 180964f0b98344f3127d6b8167cec8a07ef663ad (diff) | |
download | git-55e839e378416b70720308e86439e2ad6ecccc4a.tar.gz git-55e839e378416b70720308e86439e2ad6ecccc4a.tar.xz |
Merge branch 'js/mingw-stat'
* js/mingw-stat:
Revert "Windows: Use a customized struct stat that also has the st_blocks member."
compat: introduce on_disk_bytes()
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index cf89cdf45..1b40dbd53 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -192,6 +192,12 @@ extern int git_munmap(void *start, size_t length); #endif /* NO_MMAP */ +#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT +#define on_disk_bytes(st) ((st).st_size) +#else +#define on_disk_bytes(st) ((st).st_blocks * 512) +#endif + #define DEFAULT_PACKED_GIT_LIMIT \ ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256)) |