Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: drow@false.org
Cc: gdb-patches@sourceware.org
Subject: Re: Windows semihosting (remote-fileio) fix for console reads
Date: Wed, 14 Jun 2006 00:32:00 -0000	[thread overview]
Message-ID: <vt2bqsw60gm.fsf@theseus.home.> (raw)
In-Reply-To: <uhd2rpjwi.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 11 Jun 2006 22:33:17 +0300")


Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sat, 10 Jun 2006 19:43:57 -0400
>> From: Daniel Jacobowitz <drow@false.org>
>> 
>> #include <unistd.h>
>> #include <stdio.h>
>> #include <errno.h>
>> #include <string.h>
>> 
>> static char buf[32768];
>> 
>> int
>> main (int argc, char **argv)
>> {
>>   int ret, err;
>> 
>>   sprintf (buf, "Type something:\n");
>>   write (1, buf, strlen (buf));
>>   errno = 0;
>>   ret = read (0, buf, 26609);
>>   err = errno;
>> 
>>   sprintf (buf, "read returned %d, errno %d\n", ret, err);
>>   write (1, buf, strlen (buf));
>>   return 0;
>> }
>
> I tried this on two XP boxes: on one, 26609 was the smallest value
> that failed, on the other it started to fail with 31005.  Go figure.
>
> Anyway, I suggest to go for 16K; 8K sounds too conservative.

The patch looks okay to me; I agree with Eli's suggestion.


      reply	other threads:[~2006-06-14  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-10 18:21 Daniel Jacobowitz
2006-06-10 21:28 ` Eli Zaretskii
2006-06-10 23:44   ` Daniel Jacobowitz
2006-06-11 19:33     ` Eli Zaretskii
2006-06-14  0:32       ` Jim Blandy [this message]

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=vt2bqsw60gm.fsf@theseus.home. \
    --to=jimb@codesourcery.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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