On Tue, Dec 30, 2008 at 04:41:57PM +0100, Kurt Roeckx wrote:
> On Tue, Dec 30, 2008 at 03:11:59PM +0000, Kai Hendry wrote:
> > http.c:730: error: format '%lld' expects type 'long long int', but
> > argument 8 has type '__off_t'
> I think it's actually a "long int" (or just long) on amd64, since it's
> already 64 bit long. I think we have 1 or 2 other arches with
> the same problem.
> As far as I know, there is no printf specifier for it, and
> <inttypes.h> doesn't seem to have anything for it either.
> So what you should do is make a configure test to check the size
> and then use something like PRId32 / PRId64.
A configure check probably isn't needed. You can probably just
use sizeof(off_t) at compile time.
If you want to do it at configure time, make sure that you properly
enable LFS support in the configure script.
The proper way to get the CFLAGS for LFS support is:
Just doing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 is not
enough and will not work on all arches in Debian.
- From: "Kai Hendry" <email@example.com>
- Re: off_t
- From: Kurt Roeckx <firstname.lastname@example.org>