aboutsummaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-30 15:33:40 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-30 15:33:40 -0700
commitc6c4250eb605a502e1b5128d224561cf71272798 (patch)
treee12bdffbd7c6e7aea2ed75fcb610a836c0aef07a /git-compat-util.h
parent91863750cd09c3da93368d8fc6d3caeaabf1d66a (diff)
parent6c642a878688adf46b226903858b53e2d31ac5c3 (diff)
downloadgit-c6c4250eb605a502e1b5128d224561cf71272798.tar.gz
git-c6c4250eb605a502e1b5128d224561cf71272798.tar.xz
Merge branch 'fc/macos-x-clipped-write' into maint
Mac OS X does not like to write(2) more than INT_MAX number of bytes; work it around by chopping write(2) into smaller pieces. * fc/macos-x-clipped-write: compate/clipped-write.c: large write(2) fails on Mac OS X/XNU
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index c1f8a477f..660b7f012 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -185,6 +185,11 @@ int get_st_mode_bits(const char *path, int *mode);
#define probe_utf8_pathname_composition(a,b)
#endif
+#ifdef NEEDS_CLIPPED_WRITE
+ssize_t clipped_write(int fildes, const void *buf, size_t nbyte);
+#define write(x,y,z) clipped_write((x),(y),(z))
+#endif
+
#ifdef MKDIR_WO_TRAILING_SLASH
#define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b))
extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);