From owner-cvs-all Tue Nov 27 23:15:46 2001 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 6EAE637B417; Tue, 27 Nov 2001 23:15:33 -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 SAA10570; Wed, 28 Nov 2001 18:15:30 +1100 Date: Wed, 28 Nov 2001 18:14:26 +1100 (EST) From: Bruce Evans X-X-Sender: To: John Baldwin Cc: "Andrey A. Chernov" , , Subject: RE: cvs commit: src/lib/libc/stdlib strtol.c strtoll.c strtoq.c In-Reply-To: Message-ID: <20011128180345.C2034-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 Tue, 27 Nov 2001, John Baldwin wrote: > On 28-Nov-01 Andrey A. Chernov wrote: > > ache 2001/11/27 16:48:11 PST > > > > Modified files: > > lib/libc/stdlib strtol.c strtoll.c strtoq.c strtoul.c > > strtoull.c strtouq.c > > Log: > > Understand national (non-ASCII) digits now > > Allow bases >=36 again > > Misc cleanup > > Does this break C89? According to the manpage: This partly unbreaks C90. Negative bases are still not supported AFAIK (I haven't looked at the commit, but I discussed supporting them and thought they weren't worth supporting since supporting them would require nontrivial changes). > STANDARDS > The strtol() function conforms to ISO/IEC 9899:1990 (``ISO C89''). The > strtoll() function conforms to ISO/IEC 9899:1999 (``ISO C99''). The BSD > strtoq() function is deprecated. > > and: > > ERRORS > [EINVAL] The value of base is not supported or no conversion > could be performed. > > Does C99 support more than base 36 and if so should the manpage be updated? C99 is the same as C90, at least in the n869 draft. It requires supporting all bases. The man page should be downdated. EINVAL is only a specified error code for POSIX-1-200x. I guess weird bases could be handled correctly for C90 by not recognizing any characters if the base is weird. Just use the old error handling for this and don't set errno. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message