From: Junio C Hamano Date: Mon, 9 Sep 2013 21:50:39 +0000 (-0700) Subject: Merge branch 'sp/clip-read-write-to-8mb' X-Git-Tag: v1.8.5-rc0~160 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a23274e127fdb1674361271f14f7269f0a019cc2?ds=inline;hp=-c Merge branch 'sp/clip-read-write-to-8mb' Send a large request to read(2)/write(2) as a smaller but still reasonably large chunks, which would improve the latency when the operation needs to be killed and incidentally works around broken 64-bit systems that cannot take a 2GB write or read in one go. * sp/clip-read-write-to-8mb: Revert "compat/clipped-write.c: large write(2) fails on Mac OS X/XNU" xread, xwrite: limit size of IO to 8MB --- a23274e127fdb1674361271f14f7269f0a019cc2 diff --combined Makefile index 9135cc9358,4026211cb4..e2abb7b4ea --- a/Makefile +++ b/Makefile @@@ -69,9 -69,6 +69,6 @@@ all: # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt # doesn't support GNU extensions like --check and --statistics # - # Define NEEDS_CLIPPED_WRITE if your write(2) cannot write more than - # INT_MAX bytes at once (e.g. MacOS X). - # # Define HAVE_PATHS_H if you have paths.h and want to use the default PATH # it specifies. # @@@ -580,7 -577,6 +577,7 @@@ TEST_PROGRAMS_NEED_X += test-sigchai TEST_PROGRAMS_NEED_X += test-string-list TEST_PROGRAMS_NEED_X += test-subprocess TEST_PROGRAMS_NEED_X += test-svn-fe +TEST_PROGRAMS_NEED_X += test-urlmatch-normalization TEST_PROGRAMS_NEED_X += test-wildmatch TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) @@@ -737,7 -733,6 +734,7 @@@ LIB_H += tree-walk. LIB_H += tree.h LIB_H += unpack-trees.h LIB_H += url.h +LIB_H += urlmatch.h LIB_H += userdiff.h LIB_H += utf8.h LIB_H += varint.h @@@ -888,7 -883,6 +885,7 @@@ LIB_OBJS += tree. LIB_OBJS += tree-walk.o LIB_OBJS += unpack-trees.o LIB_OBJS += url.o +LIB_OBJS += urlmatch.o LIB_OBJS += usage.o LIB_OBJS += userdiff.o LIB_OBJS += utf8.o @@@ -1185,9 -1179,6 +1182,9 @@@ ifdef NEEDS_SSL_WITH_CRYPT else LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto endif +ifdef APPLE_COMMON_CRYPTO + LIB_4_CRYPTO += -framework Security -framework CoreFoundation +endif endif ifdef NEEDS_LIBICONV ifdef ICONVDIR @@@ -1499,11 -1490,6 +1496,6 @@@ ifndef NO_MSGFMT_EXTENDED_OPTION MSGFMT += --check --statistics endif - ifdef NEEDS_CLIPPED_WRITE - BASIC_CFLAGS += -DNEEDS_CLIPPED_WRITE - COMPAT_OBJS += compat/clipped-write.o - endif - ifneq (,$(XDL_FAST_HASH)) BASIC_CFLAGS += -DXDL_FAST_HASH endif diff --combined git-compat-util.h index 8752317fe9,96d888165b..9549de6318 --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -185,11 -185,6 +185,6 @@@ typedef unsigned long uintptr_t #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); @@@ -330,16 -325,6 +325,16 @@@ extern NORETURN void die_errno(const ch extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); +#ifndef NO_OPENSSL +#ifdef APPLE_COMMON_CRYPTO +#include "compat/apple-common-crypto.h" +#else +#include +#include +#endif /* APPLE_COMMON_CRYPTO */ +#include +#endif /* NO_OPENSSL */ + /* * Let callers be aware of the constant return value; this can help * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though, @@@ -524,7 -509,7 +519,7 @@@ int inet_pton(int af, const char *src, const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif -extern void release_pack_memory(size_t, int); +extern void release_pack_memory(size_t); typedef void (*try_to_free_t)(size_t); extern try_to_free_t set_try_to_free_routine(try_to_free_t);