From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8604 invoked by alias); 18 Sep 2005 03:44:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8478 invoked by uid 22791); 18 Sep 2005 03:44:35 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 18 Sep 2005 03:44:35 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EGq6S-0001u8-8O; Sat, 17 Sep 2005 23:44:32 -0400 Date: Sun, 18 Sep 2005 03:44:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Shaun Jackman , Richard Earnshaw , gdb-patches@sources.redhat.com Subject: Re: sim/arm/armos.c: IsTTY [PATCH] Message-ID: <20050918034432.GA6990@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Shaun Jackman , Richard Earnshaw , gdb-patches@sources.redhat.com References: <7f45d9390508151204ca0b146@mail.gmail.com> <20050830023718.GB16189@nevyn.them.org> <7f45d93905090709516f912861@mail.gmail.com> <1126170388.18092.16.camel@pc960.cambridge.arm.com> <7f45d93905090910237c63acf0@mail.gmail.com> <20050917223728.GL8777@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00155.txt.bz2 On Sun, Sep 18, 2005 at 06:32:25AM +0300, Eli Zaretskii wrote: > > Date: Sat, 17 Sep 2005 18:37:28 -0400 > > From: Daniel Jacobowitz > > Cc: Richard Earnshaw , gdb-patches@sources.redhat.com > > > > Usage Note: Don't use FILENAME_MAX as the size of an array in which > > to store a file name! You can't possibly make an array that big! Use > > dynamic allocation (see section 3.2 Allocating Storage For Program > > Data) instead. > > That's a very strange advice, especially since there's gobs of code > out there that define arrays like that to store file names. What's > the value of FILENAME_MAX on those systems where a file name can have > unlimited length? Is it really larger than a typical stack > limitation? It's looks like it has since been toned down as a matter of practicality, but yes: I believe that at one point it was INT_MAX. I.E. Much Too Big. Ah, yes, Hurd throttles it to 1K in response to a limitation in their RPC mechanism. But the developers were making noise about unthrottling it again someday. -- Daniel Jacobowitz CodeSourcery, LLC