Revert "compat/clipped-write.c: large write(2) fails on Mac OS X/XNU"
This reverts commit 6c642a878688adf46b226903858b53e2d31ac5c3. The previous commit introduced a size limit on IO chunks on all platforms. The compat clipped_write() is not needed anymore. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Steffen Prohaska committed
Aug 20, 2013 at 08:43 UTC
a487916dd51cd0e8949c1b739cb0a6a61ee03363
4 files changed
-27
Makefile
-8
@@ -69,9 +69,6 @@ all::
69
# Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt
70
# doesn't support GNU extensions like --check and --statistics
71
#
72
-# Define NEEDS_CLIPPED_WRITE if your write(2) cannot write more than
73
-# INT_MAX bytes at once (e.g. MacOS X).
74
-#
72
# Define HAVE_PATHS_H if you have paths.h and want to use the default PATH
73
# it specifies.
74
#
@@ -1493,11 +1490,6 @@ ifndef NO_MSGFMT_EXTENDED_OPTIONS
1490
MSGFMT += --check --statistics
1491
endif
1492
1496
-ifdef NEEDS_CLIPPED_WRITE
1497
- BASIC_CFLAGS += -DNEEDS_CLIPPED_WRITE
1498
- COMPAT_OBJS += compat/clipped-write.o
1499
-endif
1500
-
1493
ifneq (,$(XDL_FAST_HASH))
1494
BASIC_CFLAGS += -DXDL_FAST_HASH
1495
endif
compat/clipped-write.c
deleted
-13
@@ -1,13 +0,0 @@
1
-#include "../git-compat-util.h"
2
-#undef write
3
-
4
-/*
5
- * Version of write that will write at most INT_MAX bytes.
6
- * Workaround a xnu bug on Mac OS X
7
- */
8
-ssize_t clipped_write(int fildes, const void *buf, size_t nbyte)
9
-{
10
- if (nbyte > INT_MAX)
11
- nbyte = INT_MAX;
12
- return write(fildes, buf, nbyte);
13
-}
config.mak.uname
-1
@@ -95,7 +95,6 @@ ifeq ($(uname_S),Darwin)
95
NO_MEMMEM = YesPlease
96
USE_ST_TIMESPEC = YesPlease
97
HAVE_DEV_TTY = YesPlease
98
- NEEDS_CLIPPED_WRITE = YesPlease
98
COMPAT_OBJS += compat/precompose_utf8.o
99
BASIC_CFLAGS += -DPRECOMPOSE_UNICODE
100
endif
git-compat-util.h
-5
@@ -185,11 +185,6 @@ typedef unsigned long uintptr_t;
185
#define probe_utf8_pathname_composition(a,b)
186
#endif
187
188
-#ifdef NEEDS_CLIPPED_WRITE
189
-ssize_t clipped_write(int fildes, const void *buf, size_t nbyte);
190
-#define write(x,y,z) clipped_write((x),(y),(z))
191
-#endif
192
-
188
#ifdef MKDIR_WO_TRAILING_SLASH
189
#define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b))
190
extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);