Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 86324 invoked from network); 9 Jul 2007 22:05:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2007 22:05:36 -0000 Received: (qmail 64051 invoked by uid 500); 9 Jul 2007 22:05:37 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 64001 invoked by uid 500); 9 Jul 2007 22:05:37 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 63990 invoked by uid 99); 9 Jul 2007 22:05:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 15:05:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jorton@redhat.com designates 66.187.233.31 as permitted sender) Received: from [66.187.233.31] (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 15:05:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l69M5CNK023405 for ; Mon, 9 Jul 2007 18:05:12 -0400 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l69M5Bge013902 for ; Mon, 9 Jul 2007 18:05:11 -0400 Received: from localhost.localdomain ([127.0.0.1] helo=radish.cambridge.redhat.com) by radish.cambridge.redhat.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.62) (envelope-from ) id 1I81Lz-0004LC-5F for dev@apr.apache.org; Mon, 09 Jul 2007 23:05:11 +0100 Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.8/8.13.8/Submit) id l69M5Aop016689 for dev@apr.apache.org; Mon, 9 Jul 2007 23:05:10 +0100 Date: Mon, 9 Jul 2007 23:05:10 +0100 From: Joe Orton To: APR Developer List Subject: Re: apr_ssize_t and APR_SSIZE_T_FMT Message-ID: <20070709220510.GB16266@redhat.com> Mail-Followup-To: APR Developer List References: <46905C39.9000906@haxent.com.br> <20070709135830.GA8079@redhat.com> <4692A7C7.8000108@haxent.com.br> <20070709215412.GA16266@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20070709215412.GA16266@redhat.com> User-Agent: Mutt/1.4.2.1i Organization: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in UK and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson (USA), Charlie Peters (USA) X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jul 09, 2007 at 10:54:12PM +0100, Joe Orton wrote: > On Mon, Jul 09, 2007 at 06:25:27PM -0300, Davi Arnaut wrote: > > +AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [ > > +AC_MSG_CHECKING(whether $1 and $2 are the same) > > +AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [ > > + __builtin_types_compatible_p($1, $2); > > +], [apr_types_compile=yes], [apr_types_compile=no]) > > +AC_RUN_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT > > This should really cache properly; compiling as well as running is > redundant too; something like this should do it: Or just compile and use one of those neat tricks I can never remember to arrange for a compiler error in one of the cases... int foo[0 - __builtin_thing()]; ?