From owner-freebsd-current@FreeBSD.ORG Fri Jan 21 22:12:00 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBE0716A4CE for ; Fri, 21 Jan 2005 22:12:00 +0000 (GMT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1042F43D4C for ; Fri, 21 Jan 2005 22:12:00 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.1/8.13.1) with ESMTP id j0LMBwlm021946; Sat, 22 Jan 2005 01:11:58 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.1/8.13.1/Submit) id j0LMBwRC021945; Sat, 22 Jan 2005 01:11:58 +0300 (MSK) (envelope-from ache) Date: Sat, 22 Jan 2005 01:11:57 +0300 From: Andrey Chernov To: Joerg Wunsch Message-ID: <20050121221156.GA21459@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Joerg Wunsch , current@freebsd.org References: <20050120205501.GA69123@nagual.pp.ru> <20050120211449.GC30862@uriah.heep.sax.de> <20050120214406.GA70088@nagual.pp.ru> <20050120222137.GE30862@uriah.heep.sax.de> <20050121000916.GA73235@nagual.pp.ru> <20050121125801.GA94152@nagual.pp.ru> <20050121144428.GK30862@uriah.heep.sax.de> <20050121194103.GB19150@nagual.pp.ru> <20050121201400.GQ30862@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050121201400.GQ30862@uriah.heep.sax.de> User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.29.0.8; VDF: 6.29.0.75; host: nagual.pp.ru) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (nagual.pp.ru [0.0.0.0]); Sat, 22 Jan 2005 01:11:59 +0300 (MSK) cc: current@freebsd.org Subject: Re: Implementation errors in strtol() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 22:12:01 -0000 On Fri, Jan 21, 2005 at 09:14:00PM +0100, Joerg Wunsch wrote: > My point is: from a portability point of view, EINVAL is completely > crap. You can as well drop it. It simple means we can't rely on portability as the reason for or opposite to this change. > Do whatever you want, I think it's silly and should rather be dropped > as it is a useless feature, which could only lead people to write > unportable code. The code which _not_ expect this feature present is _equally_ unportable. If we decide this change stay or not we can't rely on portability, all things are equal there. I repeat: portable application must always consider _both_ cases since both are mentioned in the standard as possible ones. Portable application can't stay with one variant only. Even if FreeBSD not implement "may" clause, some other system can do it at any moment. Moreover, portable application must consider non-POSIX conformant systems too, it additionly complicates subject. Since we can't rely on portability, we can rely on practical reason to detect syntax errors which is hardly implemented by other methods (f.e. method you suggest can't detect overflows). Of course, such applications will be unportable per definition, but still POSIX conformant. We already have a lot of such things in our own codebase. BTW, where was you when this change was discussed and commited by first time long ago? At those time I don't remember any "against" votes. All those times passed and nobody complain until this moment. It is good sign for this change to stay. -- http://ache.pp.ru/