Re: [PATCH] minor Makefile and local-pull.c edits for Darwin
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- May 10, 2005, 14:52 UTC
- Message-ID
- <4280CAC6.4000805@zytor.com>
- In-Reply-To
- <4280C883.6080209@zytor.com>
H. Peter Anvin wrote:
Show 19 quoted lines
> Junio C Hamano wrote: > >> >> HPA> This is just plain WRONG. st.st_size is longer than long on many >> HPA> architectures, including Linux/i386. >> >> HPA> The easiest way to deal with it is to #include <inttypes.h>, use %jd >> HPA> and cast it to (intmax_t). That is, however, a C99-ism. >> >> Actually the easiest way is to stop reporting the size. Nobody >> else in core GIT reports st.st_size in their error messages. >> >> Although I agree with you that what you say about the size of >> st.st_size is correct, in GIT world view, apparently "unsigned >> long" is big enough to hold st.st_size all over the code. Would >> you recommend tackling that assumption as well? > > Probably. It's an off_t. >
That being said, there are also a whole bunch of assumptions that any object can be memory-mapped *plus* fit uncompressed in memory... that's obviously not going to be the case for large files.
On the other hand, one has to start cleaning up somewhere...
-hpa