[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E83C36D0-B72E-4E70-BEF6-4AF54BAD2863@cam.ac.uk>
Date: Mon, 20 Aug 2007 01:29:21 +0100
From: Anton Altaparmakov <aia21@....ac.uk>
To: David Brownell <david-b@...bell.net>
Cc: Al Viro <viro@....linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ptrdiff_t is not uintptr_t, damnit
Hi,
On 20 Aug 2007, at 01:19, David Brownell wrote:
> On Sunday 19 August 2007, Al Viro wrote:
>> is wrong; for one thing, it's a bad C (it's what uintptr_t is for;
>> in general
>> we are not even promised that ptrdiff_t is large enough to hold a
>> pointer,
>
> ISTR we don't *have* a uintptr_t on all architectures, or that would
> be the appropriate thing to use in these 32/64 bit ABI scenarios.
>
>
>> Use unsigned long or uintptr_t instead.
>
> I suspect you mean "unsigned long long"...
No he doesn't. "unsigned long" is guaranteed to be large enough to
hold a pointer (at least on Linux anyway).
On a 32-bit arch "unsigned long" is 32-bit and pointers are 32-bit.
On a 64-bit archi "unsigned long" is 64-bit and pointers are 64-bit.
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists