Messages in this thread | | | From | vda <> | Subject | Re: printk and long long | Date | Wed, 11 Feb 2004 16:04:48 +0200 |
| |
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/
| |