From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23130 invoked from network); 12 Aug 2005 11:31:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Aug 2005 11:31:33 -0000 Received: (qmail 784 invoked from network); 12 Aug 2005 11:31:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Aug 2005 11:31:27 -0000 Received: (qmail 4792 invoked by alias); 12 Aug 2005 11:31:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21605 Received: (qmail 4783 invoked from network); 12 Aug 2005 11:31:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Aug 2005 11:31:24 -0000 Received: (qmail 520 invoked from network); 12 Aug 2005 11:31:24 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 12 Aug 2005 11:31:16 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 12 Aug 2005 12:29:06 +0100 Received: from news01 ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC (5.0.2195.6713); Fri, 12 Aug 2005 12:31:08 +0100 Date: Fri, 12 Aug 2005 12:31:14 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: PATCH: silencing compiler warnings from gcc 4 Message-Id: <20050812123114.00f88c0b.pws@csr.com> In-Reply-To: <20050811200252.GA19497@blorf.net> References: <20050811200252.GA19497@blorf.net> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Aug 2005 11:31:08.0072 (UTC) FILETIME=[55266280:01C59F31] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Wayne Davison wrote: > As for the portability of "inline", there is an autoconf macro that I > included, AC_C_INLINE, that redefines the word "inline" as appropriate. > The rsync package used a static inline function in its rsync.h for many > years (thought I eliminated it recently), so it would seem to be quite > portable. Hmm... did I read this the right way? I had assumed that if inline wasn't available we'd use a macro. But maybe it simply means if inline isn't available, we end up calling two functions to get a simple strlen(). If that's the case it seems to be over the top... I think we would need something like #ifdef static inline size_t ZS_strlen(ZLE_STRING_T s) { return strlen((char*)s); } #else #define ZS_strlen(s) strlen((char *)s) #endif Then we still get debugging information from gcc without unnecessarily increasing the overhead with other compilers. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************