From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 01/24] types: create Date: Fri, 25 Apr 2008 12:38:13 -0700 Message-ID: <48123325.30003@zytor.com> References: <1209078352-7593-1-git-send-email-hpa@zytor.com> <1209078352-7593-2-git-send-email-hpa@zytor.com> <1209078352-7593-3-git-send-email-hpa@zytor.com> <20080425185251.GL14990@parisc-linux.org> <48122CB0.7020003@zytor.com> <20080425192858.GM14990@parisc-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080425192858.GM14990-6jwH94ZQLHl74goWV3ctuw@public.gmane.org> Sender: linux-arch-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Matthew Wilcox Cc: Linus Torvalds , Jan Engelhardt , Andrew Morton , Linux Kernel Mailing List , Linux Arch Mailing List Matthew Wilcox wrote: > On Fri, Apr 25, 2008 at 12:10:40PM -0700, H. Peter Anvin wrote: >> Well, compatibility with userspace is probably one aspect of that. >> x86-64 is the odd man out there, it defines __s64 as "long long" even >> for userspace, even though int64_t from is "long". This, >> IMO, is the Wrong Thing, but it's a separate set of changes. >> >> The right thing to do is probably to always use "long long" in the >> kernel, while defining __s64 et al as "long" on 64-bit platforms when >> not under __KERNEL__. >> >> Again, this is a separate set of changes from this patchset, which is >> just a code transformation. > > Understood, and agreed. It just seemed like an opportune time to > mention the problem of printing a u64. > I have to admit to liking the Windows extension %I64u for this kind of stuff. Unfortunately gcc/glibc decided to use I for internationalized digits instead :( -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from terminus.zytor.com ([198.137.202.10]:54636 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754635AbYDYTiV (ORCPT ); Fri, 25 Apr 2008 15:38:21 -0400 Message-ID: <48123325.30003@zytor.com> Date: Fri, 25 Apr 2008 12:38:13 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 Subject: Re: [PATCH 01/24] types: create References: <1209078352-7593-1-git-send-email-hpa@zytor.com> <1209078352-7593-2-git-send-email-hpa@zytor.com> <1209078352-7593-3-git-send-email-hpa@zytor.com> <20080425185251.GL14990@parisc-linux.org> <48122CB0.7020003@zytor.com> <20080425192858.GM14990@parisc-linux.org> In-Reply-To: <20080425192858.GM14990@parisc-linux.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Matthew Wilcox Cc: Linus Torvalds , Jan Engelhardt , Andrew Morton , Linux Kernel Mailing List , Linux Arch Mailing List Message-ID: <20080425193813.Q7Lu2s-nKX4oihdrDndQg0zWlQXDw5H18OzEtJe-rUo@z> Matthew Wilcox wrote: > On Fri, Apr 25, 2008 at 12:10:40PM -0700, H. Peter Anvin wrote: >> Well, compatibility with userspace is probably one aspect of that. >> x86-64 is the odd man out there, it defines __s64 as "long long" even >> for userspace, even though int64_t from is "long". This, >> IMO, is the Wrong Thing, but it's a separate set of changes. >> >> The right thing to do is probably to always use "long long" in the >> kernel, while defining __s64 et al as "long" on 64-bit platforms when >> not under __KERNEL__. >> >> Again, this is a separate set of changes from this patchset, which is >> just a code transformation. > > Understood, and agreed. It just seemed like an opportune time to > mention the problem of printing a u64. > I have to admit to liking the Windows extension %I64u for this kind of stuff. Unfortunately gcc/glibc decided to use I for internationalized digits instead :( -hpa