From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: Re: Windows semihosting (remote-fileio) fix for console reads
Date: Sun, 11 Jun 2006 19:33:00 -0000 [thread overview]
Message-ID: <uhd2rpjwi.fsf@gnu.org> (raw)
In-Reply-To: <20060610234357.GB10491@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 10 Jun 2006 19:43:57 -0400)
> 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.
next prev parent reply other threads:[~2006-06-11 19:33 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 [this message]
2006-06-14 0:32 ` Jim Blandy
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=uhd2rpjwi.fsf@gnu.org \
--to=eliz@gnu.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