From owner-cvs-all Mon Mar 18 20:42:30 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id AA6A437B41C; Mon, 18 Mar 2002 20:42:21 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id PAA19728; Tue, 19 Mar 2002 15:41:53 +1100 Date: Tue, 19 Mar 2002 15:41:57 +1100 (EST) From: Bruce Evans X-X-Sender: To: Peter Wemm Cc: Bruce Evans , , Subject: Re: cvs commit: src/sys/dev/amr amr.c In-Reply-To: <20020319010146.B1F17390B@overcee.wemm.org> Message-ID: <20020319153037.A4516-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 18 Mar 2002, Peter Wemm wrote: > Bruce Evans wrote: > > bde 2002/03/18 15:24:00 PST > > > > Modified files: > > sys/dev/amr amr.c > > Log: > > Fixed printf format errors in previous commit. %llu is no more suitable > > than %u for printing signed 64-bit types. It fails on different machines, > > and has the wrong signdness. > > Also, 64 bit types are not 'long long' on all of our 64 bit platforms. > They are plain %ld o4 %lu. I think int64_t == "long long" is the unusual case for 64-bit arches. %qd is no better, since although int64_t == quad_t for must arches, %q is not suitable for printing quad_t's. gcc's format checker thinks it is an alias for %ll, and printf(3) now agrees (printf(3) doesn't use quad_t internally, in preparation for fully deprecating it). Th fix should use %jd, since it really wants to use a maximal integral type, but %j is not available yet (it is is in printf(3), but not in the kernel, and gcc-2 doesn't understand it). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message