Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 89572 invoked from network); 9 Jul 2007 22:12:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2007 22:12:37 -0000 Received: (qmail 82402 invoked by uid 500); 9 Jul 2007 22:12:39 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 82137 invoked by uid 500); 9 Jul 2007 22:12:38 -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 82122 invoked by uid 99); 9 Jul 2007 22:12:38 -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:12:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [65.99.219.155] (HELO haxent.com) (65.99.219.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2007 15:12:35 -0700 Received: from karmic-2.local (unknown [201.21.180.98]) by haxent.com (Postfix) with ESMTP id 576CA3085E for ; Mon, 9 Jul 2007 19:12:14 -0300 (BRT) Message-ID: <4692B2BC.5010904@haxent.com.br> Date: Mon, 09 Jul 2007 19:12:12 -0300 From: Davi Arnaut MIME-Version: 1.0 To: APR Developer List Subject: Re: apr_ssize_t and APR_SSIZE_T_FMT References: <46905C39.9000906@haxent.com.br> <20070709135830.GA8079@redhat.com> <4692A7C7.8000108@haxent.com.br> <20070709215412.GA16266@redhat.com> <20070709220510.GB16266@redhat.com> In-Reply-To: <20070709220510.GB16266@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Joe Orton wrote: > 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()]; > +1!! int foo[-!__builtin_thing()]; -- Davi Arnaut