lkml.org 
[lkml]   [2004]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: printk and long long
Date
On Wednesday 11 February 2004 15:48, Maciej Zenczykowski wrote:
> > how about simply using a shift to output two regular longs, i.e.
> >
> > printk("%ld%ld",loff_t >> (sizeof(long) * 8), loff_t << sizeof(long) * 8
> > >> sizeof(long) * 8);
>
> I'd venture to guess you'd also have to cast the above to long.

Hey that will work only for %x, not %d.

BTW, man printf says:

The character L specifying that a following e, E, f, g, or G
conversion corresponds to a long double argument, or a following
d, i, o, u, x, or X conversion corresponds to a long long argument.
Note that long long is not specified in ANSI C and therefore
not portable to all architectures.
--
vda
-
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 14:00    [W:1.820 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site