From owner-freebsd-hackers Tue Oct 1 11:13:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FCEA37B401 for ; Tue, 1 Oct 2002 11:13:51 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 3CF7743E6E for ; Tue, 1 Oct 2002 11:13:51 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 86031 invoked by uid 1000); 1 Oct 2002 18:13:52 -0000 Date: Tue, 1 Oct 2002 11:13:52 -0700 (PDT) From: Nate Lawson To: Brooks Davis Cc: hackers@FreeBSD.ORG Subject: Re: proper printf fmt type for off_t? In-Reply-To: <20020930183946.A27098@Odin.AC.HMC.Edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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