From owner-freebsd-ports@FreeBSD.ORG Mon Jul 7 18:06:43 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 593531065670 for ; Mon, 7 Jul 2008 18:06:43 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id D30A98FC1D for ; Mon, 7 Jul 2008 18:06:42 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:55430 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KFurr-0001Qk-44 for ports@freebsd.org; Mon, 07 Jul 2008 19:51:15 +0200 Received: (qmail 34288 invoked from network); 7 Jul 2008 19:51:11 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 7 Jul 2008 19:51:11 +0200 Received: (qmail 71583 invoked by uid 1001); 7 Jul 2008 19:51:11 +0200 Date: Mon, 7 Jul 2008 19:51:11 +0200 From: Erik Trulsson To: Pietro Cerutti Message-ID: <20080707175111.GA71534@owl.midgard.homeip.net> References: <200807071619.m67GJrPt096421@freefall.freebsd.org> <487245AE.1030307@FreeBSD.org> <20080707164119.GG17123@deviant.kiev.zoral.com.ua> <48725051.3090601@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48725051.3090601@FreeBSD.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1KFurr-0001Qk-44. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KFurr-0001Qk-44 896f107bf19273a98c1a0402fb59e59e Cc: Kostik Belousov , ports@freebsd.org, bug-followup , fjoe@freebsd.org Subject: Re: ports/124985: [patch] devel/dmucs unbreak on 64bits archs X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 18:06:43 -0000 On Mon, Jul 07, 2008 at 07:20:17PM +0200, Pietro Cerutti wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Kostik Belousov wrote: > | On Mon, Jul 07, 2008 at 06:34:54PM +0200, Pietro Cerutti wrote: > |> I definitely do not agree. Please note that a pointer is not required to > |> fit into a long, while it is required to fit into a size_t. > | I do not think that C99 requires the size_t to be capable of holding > | the pointer. size_t is only required to hold result of sizeof. > > size_t is required to be of rank equal to or greater than any other > object you can create from within the C language. This implies that it > can (i.e., it is required to be able to) hold a pointer type. Wrong. There is no requirement in C that there exists *any* integer type large enough to hold a pointer - and certainly not that size_t is such a type. size_t must be large enough to hold the size of any object that the C implementation allows you to create, but there is no requirement that you can create an object that occupies the whole memory space. (E.g. if you had an implementation that did not allow to create any arrays larger than 4GB or to malloc() more than 4GB at a time, then it would suffice to have a 32-bit size_t even if pointers were 64-bit. (For older machines make that: 64KB objects, 16-bit size_t and 32-bit pointers.)) > > | > | It is intptr_t type that shall do it. > > Unfortunately intptr_t is not defined prior to C99, and I still haven't > got used to use it. Yes, that would be the preferred solution. > -- Erik Trulsson ertr1013@student.uu.se