From owner-cvs-all@FreeBSD.ORG Sat Jun 19 07:19:23 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6CB416A4CE; Sat, 19 Jun 2004 07:19:23 +0000 (GMT) Received: from VARK.homeunix.com (c-67-174-240-84.client.comcast.net [67.174.240.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C6A943D49; Sat, 19 Jun 2004 07:19:23 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i5J7J9lp073651; Sat, 19 Jun 2004 00:19:09 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i5J7J9rR073617; Sat, 19 Jun 2004 00:19:09 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 19 Jun 2004 00:17:54 -0700 From: David Schultz To: Maxime Henrion Message-ID: <20040619071754.GA73529@VARK.homeunix.com> Mail-Followup-To: Maxime Henrion , Dag-Erling Sm?rgrav , Max Laier , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200406171523.i5HFNpjs011498@repoman.freebsd.org> <20040618143127.GP9228@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040618143127.GP9228@elvis.mu.org> cc: Dag-Erling Sm?rgrav cc: Max Laier cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG cc: cvs-src@FreeBSD.ORG Subject: Re: cvs commit: src/contrib/pf/pfctl pfctl_parser.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 07:19:23 -0000 On Fri, Jun 18, 2004, Maxime Henrion wrote: > Dag-Erling Sm?rgrav wrote: > > Max Laier writes: > > > Log: > > > Fix printing of u_int64_t with a cast to unsigned long long. > > > > The correct fix is to cast it to uintmax_t and print it with %ju. > > Using %llu and a cast to (unsigned long long) is as correct as using > uintmax_t and %ju because the C99 standard says that "long long" is at > least 64-bit wide. We generally use {u,}intmax_t in FreeBSD because > it works in more cases, but in that case we can't because OpenBSD > doesn't have intmax_t. /me wonders how much backpedaling we'll wind up doing on the uintmax_t casts when someone decides to add uint128_t to gcc and uintmax_t becomes painfully slow on 32-bit arches. ;-)