From owner-cvs-lib Tue Jul 1 13:31:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA19274 for cvs-lib-outgoing; Tue, 1 Jul 1997 13:31:54 -0700 (PDT) Received: from time.cdrom.com (root@time.cdrom.com [204.216.27.226]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA19265; Tue, 1 Jul 1997 13:31:47 -0700 (PDT) Received: from time.cdrom.com (jkh@localhost.cdrom.com [127.0.0.1]) by time.cdrom.com (8.8.5/8.6.9) with ESMTP id NAA00929; Tue, 1 Jul 1997 13:31:25 -0700 (PDT) To: Bruce Evans cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-lib@FreeBSD.ORG, jkh@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdio scanf.3 vfscanf.c In-reply-to: Your message of "Wed, 02 Jul 1997 06:05:39 +1000." <199707012005.GAA02012@godzilla.zeta.org.au> Date: Tue, 01 Jul 1997 13:31:25 -0700 Message-ID: <925.867789085@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I had this patch in my "needs more work" basket. Its use of strtoq() and Well, maybe now that it's in the tree and open to wider scrutiny, somebody can actually push David D. in the direction of greater "undefined compatibility" :-) Jordan > strtouq() for ints and longs is inefficient in all cases and incompatible > in overflow cases. The behaviour in overflow cases seems to be undefined, > so it isn't a bug that the submitted patch would change the result read > by sscanf("4294967296", "%ld", &foo) from INT_MAX to 0 (for 32-bit ints), > it is just incompatible. > > The int vs long case was already poorly handled by using strtol() and > strtoul() for ints. > > Bruce