From owner-freebsd-hackers Sat Aug 7 12: 2: 5 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 2A73C14C33; Sat, 7 Aug 1999 12:02:01 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id UAA71997; Sat, 7 Aug 1999 20:03:15 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Sat, 7 Aug 1999 20:03:15 +0100 (BST) From: Doug Rabson To: Bernd Walter Cc: Peter Wemm , "Brian F. Feldman" , Don Lewis , Sheldon Hearn , freebsd-hackers@freebsd.org Subject: Re: quad_t and portability In-Reply-To: <19990807165202.A37288@cicely8.cicely.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 7 Aug 1999, Bernd Walter wrote: > On Sat, Aug 07, 1999 at 05:38:48PM +0800, Peter Wemm wrote: > > "Brian F. Feldman" wrote: > > > On Fri, 6 Aug 1999, Don Lewis wrote: > > > > > > > On Aug 6, 3:29pm, Sheldon Hearn wrote: > > > > } Subject: quad_t and portability > > > > } > > > > } Hi folks, > > > > } > > > > } I want to patch wc(1) so that it uses quad_t instead of u_long. This is > > > > } necessary if wc(1) is to produce sensible results for files containing > > > > } more than 4GB of data. > > > > > > > > Why not off_t, which should be portable and scale properly with the > > > > maximum system file size. Then the only problem is figuring a portable > > > > means of printing the result ... > > > > > > > > > > You can always use off_t with "%qd", (int64_t)foo. > > > > But not on the Alpha... int64_t is a long there, and gcc complains unless > > you use %ld. > Mmm and long is 32Bit it seems. > At least that would explain some of the warnings I got when setting MAXDSIZ to > 128G on alpha. Long is 64bit, int is 32bit on the alpha. Use u_int64_t to specify the bitsize. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message