lkml.org 
[lkml]   [2003]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: SPAM[RBL] Re: C99 types VS Linus types
Date
On Sunday 06 July 2003 14:23, Philippe Elie wrote:

> alpha user space .h define uint64_t as unsigned long,
> include/asm-alpha/types.h defines it as unsigned long long.

Why is that? Isn't uint64_t supposed to be _always_ a 64bit
unsigned integer? Either the kernel or the user space might
be doing the wrong thing...

I've Cc'd the Alpha mantainer to make him aware of this
problem.

> Using a different definition (if it's possible) will be
> confusing. Using the same definition as user space means
> than code like:
>
> uint64 t u;
> printk("%lu", u);
>
> will not compile on alpha. This problem is solved in C99
> by using PRI_xxx format specifier macro, I'm not a great
> fan of this idea.

This is ugly, but there is no way around it. No matter what
typedefs you're using, C99 or not, printf size specifiers are
always bound to plain C types, whose size varies from
platform to platform.

> surely vim allow to define your own set of type ?

Yeah, but not if you're lazy ;-)

--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.077 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site