Re: printk and long long

From: Timothy Miller
Date: Wed Feb 11 2004 - 17:34:58 EST




Chris Friesen wrote:
Måns Rullgård wrote:

What is the proper way to deal with printing an int64_t when int64_t
can be either long or long long depending on machine?


Print it as long long, and even if there is an arch where that is 128 bits it'll still work.


In that case you'll want to cast it to (long long) before you pass it so as to be sure that "%lld" and the parameter are the same size. Right?

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