From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17653 invoked by alias); 11 Jun 2006 19:33:21 -0000 Received: (qmail 17645 invoked by uid 22791); 11 Jun 2006 19:33:21 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 11 Jun 2006 19:33:20 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-34-236.inter.net.il [80.230.34.236]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DRO58867 (AUTH halo1); Sun, 11 Jun 2006 22:33:16 +0300 (IDT) Date: Sun, 11 Jun 2006 19:33:00 -0000 Message-Id: From: Eli Zaretskii To: gdb-patches@sourceware.org In-reply-to: <20060610234357.GB10491@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 10 Jun 2006 19:43:57 -0400) Subject: Re: Windows semihosting (remote-fileio) fix for console reads Reply-to: Eli Zaretskii References: <20060610182130.GA3527@nevyn.them.org> <20060610234357.GB10491@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00143.txt.bz2 > Date: Sat, 10 Jun 2006 19:43:57 -0400 > From: Daniel Jacobowitz > > #include > #include > #include > #include > > 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.