From owner-freebsd-bugs@FreeBSD.ORG Wed May 31 12:39:39 2006 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.org Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01A8C16A4B3 for ; Wed, 31 May 2006 12:39:39 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B63443D53 for ; Wed, 31 May 2006 12:39:38 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (Postfix) with ESMTP id 9A1D33281CE; Wed, 31 May 2006 22:39:35 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4VCdWJa030345; Wed, 31 May 2006 22:39:34 +1000 Date: Wed, 31 May 2006 22:39:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Maxim Konovalov In-Reply-To: <200605301350.k4UDoIAj049864@freefall.freebsd.org> Message-ID: <20060531221622.I30824@delplex.bde.org> References: <200605301350.k4UDoIAj049864@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/98141: [patch] Update for regression/sockets/unix_cmsg X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 12:39:40 -0000 On Tue, 30 May 2006, Maxim Konovalov wrote: > > o Use PRIdMAX macro for outputting intmax_t values. > > What is it for? I see nothing is using this macro in the base system > and it is defined as "jd" on all our platforms. Unfortunately, the PRI* mistake is used in a few places in the base system. At least: libc_r/test/ fsck_ffs/ (of all places) find/ getconf/ memcontrol/ Its use in find/ is an especially good example of how not to use it. In fsck_ffs/, PRI_i64 is used to print some types that are certain to match, but in find/ PRI_i64 is used to print st_blocks and st_size which have opaque types. st_blocks happens to have type int64_t, but POSIX reqires it to have type blkcnt_t which can be any signed integer type. st_size has type off_t which happens to match. find/ also prints st_ino using a cast to u_long on the same line that it prints st_blocks without a cast. Bruce