Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Aug 19, 2013, 14:41 UTC
- Message-ID
- <52122E8D.7030209@web.de>
- In-Reply-To
- <1376894300-28929-1-git-send-email-prohaska@zib.de>
On 2013-08-19 08.38, Steffen Prohaska wrote: [snip]
Show 9 quoted lines
> diff --git a/builtin/var.c b/builtin/var.c
> index aedbb53..e59f5ba 100644
> --- a/builtin/var.c
> +++ b/builtin/var.c
> @@ -38,6 +38,7 @@ static struct git_var git_vars[] = {
> { "", NULL },
> };
>
> +#undef readThis is techically right for this very version of the code, but not really future proof, if someone uses read() further down in the code (in a later version)
I think the problem comes from further up:
------------------
struct git_var {
const char *name;
const char *(*read)(int);
};
-----------------
could the read be replaced by readfn ?===================
Show 9 quoted lines
> diff --git a/streaming.c b/streaming.c > index debe904..c1fe34a 100644 > --- a/streaming.c > +++ b/streaming.c > @@ -99,6 +99,7 @@ int close_istream(struct git_istream *st) > return r; > } > > +#undef read
Same possible future problem as above. When later someone uses read, the original (buggy) read() will be used, and not the re-defined clipped_read() from git-compat-util.h