From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Edmondson Subject: Re: Howto print off_t Date: Thu, 27 Jun 2002 20:24:27 +0100 Sender: linux-c-programming-owner@vger.kernel.org Message-ID: <02062720242701.02594@localhost.localdomain> References: <15642.44080.970456.988159@cerise.nosuchdomain.co.uk> Reply-To: inbox@andy.co.uk Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <15642.44080.970456.988159@cerise.nosuchdomain.co.uk> List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-c-programming@vger.kernel.org Cc: Holger.Kiehl@dwd.de On Thu, 27 Jun 2002, Glynn Clements wrote: > Holger Kiehl wrote: > > What is the best way to print an off_t variable. On a 32 bit machine > > you can print it with %ld and on a 64 bit machine you need to print > > it with %lld. > > On a 64-bit machine, "long" is probably 64 bits. > > > Do all implementations know about %lld? > > No. Technically no, but c99 defines long long with the modifier ll in conjunction with d, i, o, u, x, X so %lld is valid and should be portable. -- Andrew Edmondson Test Development Engineer <--------------------------> The discerning heart seeks knowledge, but the mouth of a fool feeds on folly.