From owner-cvs-all@FreeBSD.ORG Sun Jan 21 23:05:21 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0158416A401 for ; Sun, 21 Jan 2007 23:05:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B129C13C465 for ; Sun, 21 Jan 2007 23:05:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l0LN1Hw5063137; Sun, 21 Jan 2007 16:01:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 21 Jan 2007 16:01:40 -0700 (MST) Message-Id: <20070121.160140.1973605866.imp@bsdimp.com> To: max@love2party.net From: "M. Warner Losh" In-Reply-To: <200701212037.25404.max@love2party.net> References: <20070121131229.014eda2e@Magellan.Leidinger.net> <20070121.084719.-233674217.imp@bsdimp.com> <200701212037.25404.max@love2party.net> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 21 Jan 2007 16:01:18 -0700 (MST) Cc: scottl@samsco.org, src-committers@freebsd.org, netchild@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, sam@errno.com Subject: Re: cvs commit: src/sys/compat/linprocfs linprocfs.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2007 23:05:21 -0000 In message: <200701212037.25404.max@love2party.net> Max Laier writes: : On Sunday 21 January 2007 16:47, M. Warner Losh wrote: : > In message: <20070121131229.014eda2e@Magellan.Leidinger.net> : > : > Alexander Leidinger writes: : > : I was thinking more about something like: : > : to print identifier to use in the : > : kernel sizeof() %zd : > : int64_t xyz : > : int32_t klm : > : ... ... : > : > The last two aren't possible to print without casts, or the PRI_xxx : > macros. : : That's right, but I think we can fix it by simply making int64_t an alias : for "long long" on all architectures. I still haven't heard any reason : not to just do this - is there something, other than historical? The short answer is because long long and long are different types. Changing the underlying type for uint64_t and friends would break user's code as the underlying type changes. And it isn't portable, which would make code written for FreeBSD much less portable. The only portable way is to use the PRI* macros. We can paper over this fact, kinda, in FreeBSD. So long as we never have an architecture where long long isn't 128 bits. In short, this is a really bad idea. Warner