From: Dan Magenheimer Subject: RE: size_t and printk and Xen Date: Sun, 12 Oct 2008 10:44:02 -0700 (PDT) Message-ID: <3924720e-82a1-4429-9951-14731d76b5a2@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org > On 12/10/08 10:22, "Keir Fraser" wrote: >=20 > >>=20 > >> Is the typedef historical and should be removed? Or is it > >> necessary for some (older?) compilers? > >=20 > > Removing it would break the build, I think. >=20 > I'm no particular fan of size_t in hypervisor interfaces=20 > though. So, for > example, switching xmalloc() interfaces to use unsigned int=20 > instead would be > fine by me, and this would sidestep the issue perhaps? I think C99 size_t may have compile-time type-checking uses so I'd be hesitant to remove it entirely. I do suspect the typedef pre-dates the addition to Xen of a more modern printk, but I suppose we have bigger fish to fry and using %lu in the printk format string and an unsigned-long cast in the argument list is annoying but works. Dan