From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Junio C Hamano'" <gitster@pobox.com>,
"'Joachim Schmitz'" <jojo@schmitz-digital.de>
Cc: "'Git Mailing List'" <git@vger.kernel.org>
Subject: RE: read() MAX_IO_SIZE bytes, more than SSIZE_MAX?
Date: Sat, 7 Feb 2015 21:32:33 -0500 [thread overview]
Message-ID: <020e01d04347$7efbe200$7cf3a600$@nexbridge.com> (raw)
In-Reply-To: <CAPc5daXD_7XZD5Vag51BjrSZ0q1r9eMswhLmnpUFqqjrc9oSTw@mail.gmail.com>
On Feb 7 2015 at 9:14 PM Junio C Hamano wrote:
>On Sat, Feb 7, 2015 at 2:31 PM, Joachim Schmitz <jojo@schmitz-digital.de> wrote:
>> Junio C Hamano <gitster <at> pobox.com> writes:
>>>
>>> Yup, I agree that is a sensible way to go.
>>>
>>> (1) if Makefile overrides the size, use it; otherwise
>>> (2) if SSIZE_MAX is defined, and it is smaller than our internal
>>> default, use it; otherwise
>>> (3) use our internal default.
>>>
>>> And leave our internal default to 8MB.
>>>
>>> That way, nobody needs to do anything differently from his current
>>> build
>> set-up,
>>> and I suspect that it would make step (1) optional.
>>
>> something like this:
>>
>> /* allow overwriting from e.g. Makefile */ #if !defined(MAX_IO_SIZE) #
>> define MAX_IO_SIZE (8*1024*1024) #endif
>> /* for plattforms that have SSIZE and have it smaller */ #if
>> defined(SSIZE_MAX && (SSIZE_MAX < MAX_IO_SIZE) # undef MAX_IO_SIZE /*
>> avoid warning */ # define MAX_IO_SIZE SSIZE_MAX #endif
>No, not like that. If you do (1), that is only so that the Makefile can override a broken definition a platform may give to SSIZE_MAX. So
> (1) if Makefile gives one, use it without second-guessing with SSIZE_MAX.
> (2) if SSIZE_MAX is defined, and if it is smaller than our internal default, use it.
> (3) all other cases, us our internal default.
That is reasonable. I am more concerned about our git-upload-pak (separate thread) anyway :)
Cheers, Randall
next prev parent reply other threads:[~2015-02-08 2:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 16:45 read() MAX_IO_SIZE bytes, more than SSIZE_MAX? Joachim Schmitz
2015-02-07 16:48 ` Joachim Schmitz
2015-02-07 17:19 ` Torsten Bögershausen
2015-02-07 17:29 ` Joachim Schmitz
2015-02-07 18:03 ` Joachim Schmitz
2015-02-07 20:32 ` Torsten Bögershausen
2015-02-07 22:13 ` Junio C Hamano
2015-02-07 22:31 ` Joachim Schmitz
2015-02-08 2:13 ` Junio C Hamano
2015-02-08 2:32 ` Randall S. Becker [this message]
2015-02-08 12:05 ` Joachim Schmitz
2015-02-08 17:09 ` Eric Sunshine
2015-02-11 21:13 ` Junio C Hamano
2015-02-11 21:29 ` Joachim Schmitz
2015-02-11 22:05 ` Joachim Schmitz
2015-02-11 23:15 ` Junio C Hamano
2015-02-07 18:06 ` Randall S. Becker
2015-02-07 18:20 ` Randall S. Becker
2015-02-07 18:36 ` Joachim Schmitz
2015-02-07 19:14 ` Joachim Schmitz
-- strict thread matches above, loose matches on Subject: below --
2015-02-12 7:46 Joachim Schmitz
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='020e01d04347$7efbe200$7cf3a600$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jojo@schmitz-digital.de \
/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;
as well as URLs for NNTP newsgroup(s).