Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Oct 2002 11:13:52 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: proper printf fmt type for off_t?
Message-ID:  <Pine.BSF.4.21.0210011109570.85911-100000@root.org>
In-Reply-To: <20020930183946.A27098@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 30 Sep 2002, Brooks Davis wrote:
> On Mon, Sep 30, 2002 at 06:36:39PM -0700, Nate Lawson wrote:
> > What's the portable way of printing an off_t?  It should work on Linux and
> > FreeBSD.  Linux seems to recommend casting the off_t to intmax_t which
> > isn't present in FreeBSD.  This is in usermode.
> 
> In current, intmax_t is defined in stdint.h.  In stable, I think you're
> SOL and have to cast to quad_t which is totally non-portable.
> 
> -- Brooks

Thanks.  Yeah I couldn't find intmax_t on -stable and figured someone had
an acceptable workaround.  I think I'll add my own intmax_t typedef for
__FreeBSD_version < 500000.

-Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0210011109570.85911-100000>