From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18089 invoked from network); 20 Jun 2001 17:16:40 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Jun 2001 17:16:40 -0000 Received: (qmail 15598 invoked by alias); 20 Jun 2001 17:16:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14998 Received: (qmail 15570 invoked from network); 20 Jun 2001 17:16:00 -0000 From: "Bart Schaefer" Message-Id: <1010620171243.ZM8591@candle.brasslantern.com> Date: Wed, 20 Jun 2001 17:12:43 +0000 In-Reply-To: Comments: In reply to Andrej Borsenkow "Re: AIX patch" (Jun 19, 10:48pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Andrej Borsenkow Subject: Re: AIX patch Cc: ZSH Workers Mailing List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 19, 10:48pm, Andrej Borsenkow wrote: } Subject: Re: AIX patch } } On Tue, 19 Jun 2001, Bart Schaefer wrote: } } > Linux/gcc apparently has an actual `socklen_t' typedef. Probably should } > try that first. } > } > + for zsh_type in socklen_t int "unsigned long" size_t ; do } } I had some considerations for testing for int first. If we hit some really } broken compiler that does not care about protoype mismatch we better have } the "most common" case first. That's an excellent reason for trying int *second*. If the socklen_t typedef exists, it's almost certainly the right thing to use. If it doesn't exist, it won't matter whether the compiler cares for matching prototypes because it'll be a syntax error. I strongly suspect that the intersection of compilers that botch up the matching prototypes with headers that typedef socklen_t is the empty set. } It defaulted to int before - so let's stick to int as much as } possible. May be, I'm just plain paranoid. And the whole needs check } for general prototype support of course. That raises the question of what SOCKLEN_T gets defined to be when NONE of the types that are attempted work. (It also raises the question of whether we should be testing for HAVE_SOCKLEN_T and providing our own typedef if not, rather than defining a SOCKLEN_T macro.) I think the right way to default to `int' is to fall back on it when the test fails entirely. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net