Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Feb 2005 22:15:23 -0800
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Joseph Koshy <joseph.koshy@gmail.com>
Cc:        Mathew Kanner <mat@cnd.mcgill.ca>
Subject:   Re: cross platform
Message-ID:  <420EF07B.6010303@freebsd.org>
In-Reply-To: <84dead720502122050492cde82@mail.gmail.com>
References:  <20050212145501.GG5488@cnd.mcgill.ca> <84dead720502122050492cde82@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Joseph Koshy wrote:
> 
> I had a problem with printing uint64_t values portably between
> the AMD 64 and i386.

printf("%jx", (uintmax_t)v);

This is about as portable as you can
get, since it's defined as part of
Standard C.

Cheers,

Tim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?420EF07B.6010303>