From owner-svn-src-head@FreeBSD.ORG Thu Dec 4 10:55:40 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C87C106567F; Thu, 4 Dec 2008 10:55:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 2D7498FC14; Thu, 4 Dec 2008 10:55:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-107-116-223.carlnfd1.nsw.optusnet.com.au (c122-107-116-223.carlnfd1.nsw.optusnet.com.au [122.107.116.223]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id mB4AtSSU008617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Dec 2008 21:55:36 +1100 Date: Thu, 4 Dec 2008 21:55:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Max Laier In-Reply-To: <200812040009.30837.max@love2party.net> Message-ID: <20081204213600.G4414@delplex.bde.org> References: <200812032300.mB3N0vZW003970@svn.freebsd.org> <200812040009.30837.max@love2party.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Max Laier , src-committers@freebsd.org Subject: Re: svn commit: r185594 - head/sbin/newfs_msdos X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 10:55:40 -0000 On Thu, 4 Dec 2008, Max Laier wrote: > On Thursday 04 December 2008 00:00:57 Max Laier wrote: >> Author: mlaier >> Date: Wed Dec 3 23:00:57 2008 >> New Revision: 185594 >> URL: http://svn.freebsd.org/changeset/base/185594 >> >> Log: >> Fix build - cast off_t to (intmax_t) for printing. intmax_t is declared in , but this patch gets it by including the full bloat of . However, is needed for a complete fix. Input of off_t's is still broken -- it uses strtoll(), but should use strtoimax() so as not to depend on the implementation of off_t and so as not to have style bugs (any use of long long). > I'd really like to typedef the int64 types "long long" on all architectures > :-\ It's a big POLA violation in my opinion and causes quite a bit of porting > headache. Or at least let's fix printf to understand that "long" types on > 64bit architectures can be printed with %ll. Since they are - in fact - 64bit > wide. > > But I keep reiterating this point - I guess I still don't understand the exact > reason why we can't just do that. This would break detection of the bug that you fixed. Printing off_t using either %ld or %lld is a bug, since off_t might not be either of long or long long. Having %ld (physically) incompatible with long long on 32-bit arches and %lld (only logically) incompatible with long long on 64-bit arches results in both errors being detected eventually. Bruce