Re: [PATCH] xread(): Fix read error when filtering = 2GB on Mac OS X

2013-08-17 Thread John Keeping
On Sat, Aug 17, 2013 at 02:40:05PM +0200, Steffen Prohaska wrote: Previously, filtering more than 2GB through an external filter (see test) failed on Mac OS X 10.8.4 (12E55) with: error: read from external filter cat failed error: cannot feed the input to external filter cat

Re: [PATCH] xread(): Fix read error when filtering = 2GB on Mac OS X

2013-08-17 Thread Torsten Bögershausen
On 2013-08-17 14.40, Steffen Prohaska wrote: Previously, filtering more than 2GB through an external filter (see test) failed on Mac OS X 10.8.4 (12E55) with: error: read from external filter cat failed error: cannot feed the input to external filter cat error: cat died of

Re: [PATCH] xread(): Fix read error when filtering = 2GB on Mac OS X

2013-08-17 Thread Johannes Sixt
Am 17.08.2013 14:40, schrieb Steffen Prohaska: Previously, filtering more than 2GB through an external filter (see test) failed on Mac OS X 10.8.4 (12E55) with: error: read from external filter cat failed error: cannot feed the input to external filter cat error: cat died of

Re: [PATCH] xread(): Fix read error when filtering = 2GB on Mac OS X

2013-08-17 Thread Jonathan Nieder
Hi, Steffen Prohaska wrote: --- a/wrapper.c +++ b/wrapper.c @@ -139,6 +139,14 @@ ssize_t xread(int fd, void *buf, size_t len) { ssize_t nr; while (1) { +#ifdef __APPLE__ + const size_t twoGB = (1l 31); + /* len = 2GB immediately fails on Mac OS X

Re: [PATCH] xread(): Fix read error when filtering = 2GB on Mac OS X

2013-08-17 Thread Kyle J. McKay
On Aug 17, 2013, at 05:40, Steffen Prohaska wrote: Previously, filtering more than 2GB through an external filter (see test) failed on Mac OS X 10.8.4 (12E55) with: error: read from external filter cat failed error: cannot feed the input to external filter cat error: cat died of

Re: [PATCH] xread(): Fix read error when filtering = 2GB on Mac OS X

2013-08-17 Thread Jonathan Nieder
Kyle J. McKay wrote: According to POSIX [1] for read: If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined. Sure. [...] Since OS X still supports running 32-bit executables, and SSIZE_MAX is 2GB - 1 when running 32-bit it would seem the same limit has