Subject: printf and 64 bit
To: None <netbsd-users@netbsd.org>
From: Jorgen Lundman <lundman@lundman.net>
List: netbsd-users
Date: 11/20/2003 08:23:39
Slightly off-topic and I apologise, but I use NetBSD for my development and I
respect the opinions of those that also do (they are sane enough to run NetBSD
right?)
But does anyone have a good/cute way of dealing with printing 64 bit values in
*printf functions? Previously I've done a list of #ifdef for various OSs.
BSD: %q and "long long"
IRIX/HPUX: %ll and "long long"
OSF1: %l and "long"
Win32: %I64i and "__int64" (no unsigned version)
and there probably are many more.
I could just change it into a string and use %s, perhaps that is the
easiest/most-portable?
Opinions?
Lundy
--
Jorgen Lundman | <lundman@lundman.net>
Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell)
Japan | +81 (0)3 -3375-1767 (home)