From: "H. Peter Anvin" <hpa@zytor.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Junio C Hamano <junkio@cox.net>, Mark Allen <mrallen1@yahoo.com>,
git@vger.kernel.org
Subject: Re: [PATCH] minor Makefile and local-pull.c edits for Darwin
Date: Tue, 10 May 2005 07:52:54 -0700 [thread overview]
Message-ID: <4280CAC6.4000805@zytor.com> (raw)
In-Reply-To: <4280C883.6080209@zytor.com>
H. Peter Anvin wrote:
> 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
next prev parent reply other threads:[~2005-05-10 14:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-10 2:11 [PATCH] minor Makefile and local-pull.c edits for Darwin Mark Allen
2005-05-10 4:23 ` Daniel Barkalow
2005-05-10 6:37 ` Junio C Hamano
2005-05-10 4:30 ` H. Peter Anvin
2005-05-10 6:44 ` Junio C Hamano
2005-05-10 14:43 ` H. Peter Anvin
2005-05-10 14:52 ` H. Peter Anvin [this message]
2005-05-10 21:05 ` Junio C Hamano
2005-05-10 21:12 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4280CAC6.4000805@zytor.com \
--to=hpa@zytor.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=mrallen1@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox