From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 17 07:40:02 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3904516A41B for ; Mon, 17 Sep 2007 07:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EE06713C457 for ; Mon, 17 Sep 2007 07:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H7e1Ii037011 for ; Mon, 17 Sep 2007 07:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8H7e16Z037010; Mon, 17 Sep 2007 07:40:01 GMT (envelope-from gnats) Resent-Date: Mon, 17 Sep 2007 07:40:01 GMT Resent-Message-Id: <200709170740.l8H7e16Z037010@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ighighi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABA4416A417 for ; Mon, 17 Sep 2007 07:33:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 945A713C45E for ; Mon, 17 Sep 2007 07:33:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H7XRWi067277 for ; Mon, 17 Sep 2007 07:33:27 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l8H7XRmS067276; Mon, 17 Sep 2007 07:33:27 GMT (envelope-from nobody) Message-Id: <200709170733.l8H7XRmS067276@www.freebsd.org> Date: Mon, 17 Sep 2007 07:33:27 GMT From: Ighighi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/116413: incorrect getconf(1) handling of unsigned constants gives -1 for ULLONG_MAX X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 07:40:02 -0000 >Number: 116413 >Category: bin >Synopsis: incorrect getconf(1) handling of unsigned constants gives -1 for ULLONG_MAX >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 17 07:40:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Ighighi >Release: 6.2-STABLE >Organization: >Environment: FreeBSD orion 6.2-STABLE FreeBSD 6.2-STABLE #0: Fri Sep 14 09:58:01 VET 2007 root@orion:/usr/obj/usr/src/sys/CUSTOM i386 >Description: The code /usr/src/usr.bin/getconf/limits.gperf doesn't correctly handle unsigned constants. Since it uses an intmax_t for all included variables, any value larger than INTMAX_MAX is printed incorrectly. So, on my machine it prints -1 for ULLONG_MAX when it should print: 18446744073709551615 (defined in to be 0xffffffffffffffffULL) if the desktop calculator isn't fooling me >How-To-Repeat: getconf ULLONG_MAX >Fix: I could submit a patch if there's a minimal guarantee that I won't lose my time... >Release-Note: >Audit-Trail: >Unformatted: