From owner-freebsd-arch@FreeBSD.ORG Thu May 8 09:12:26 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ACBE37B401; Thu, 8 May 2003 09:12:26 -0700 (PDT) Received: from mx0.freebsd-services.com (survey.codeburst.net [195.149.39.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E5FC43FA3; Thu, 8 May 2003 09:12:25 -0700 (PDT) (envelope-from paul@freebsd-services.com) Received: by mx0.freebsd-services.com (Postfix, from userid 1002) id 499E01B212; Thu, 8 May 2003 17:12:24 +0100 (BST) Date: Thu, 8 May 2003 17:12:24 +0100 From: Paul Richards To: "Jacques A. Vidrine" , David O'Brien , freebsd-arch@FreeBSD.org Message-ID: <20030508161223.GL1869@survey.codeburst.net> References: <20030501182820.GA53641@madman.celabo.org> <20030503201409.GA41554@dragon.nuxi.com> <20030505175428.GA19275@madman.celabo.org> <20030506170919.GD36798@dragon.nuxi.com> <20030506175557.GE79167@madman.celabo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030506175557.GE79167@madman.celabo.org> User-Agent: Mutt/1.4.1i Subject: Re: Re: `Hiding' libc symbols X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2003 16:12:26 -0000 On Tue, May 06, 2003 at 12:55:57PM -0500, Jacques A. Vidrine wrote: > On Tue, May 06, 2003 at 10:09:19AM -0700, David O'Brien wrote: > > On Mon, May 05, 2003 at 12:54:28PM -0500, Jacques A. Vidrine wrote: > > > > > I'm backing out the commit in good faith and in the hopes that the > > > > > big picture comes more clearly into focus. > > > > > > > > Thanks. > > > > > > Do you also want to `fix' the other ports that define their own strlcpy? > > > > Ports have maintainers. Please create a PR for them. > > But gee, the problem is that the ports themselves are not really > in error, unless one is a standards fascist that believes that an > application can never define any function that might be in some > standard's namespace. Any C code that isn't written according to the standard that defines C is broken. There's just no argument to be made that FreeBSD should be hacked to support C code that is written by programmers who haven't bothered to learn the rules of C properly. That's not to say there aren't a lot of crap programmers out there who don't know what they're doing but FreeBSD should not be bending over backwards to make their code work, we should just leave it be broken. In the case you've cited throughout this thread, where libc calls into an application's implementation of a reserved symbol, this breaks nothing except the application, which was where the real bug existed. The only benefit that your solution offers is that broken code *may* work better. The downside, is people who really know what they're doing and deliberately want to override a standard function need to jump through extra hoops that they won't even be aware of. My opinion is that FreeBSD should cater to the people who know their stuff and let the crap programmers out their be shown the bugs that exist in their code when they try to use it on FreeBSD. I want FreeBSD to be the environment where I can develop my code with a high degree of confidence that I'm doing things right and for FreeBSD to show up the problems if I'm doing it wrong. I don't want to find that FreeBSD was hiding my own inadequacies from me :-) In that light, if I implement a broken strlcpy and my application falls over in a heap because libc calls it then I should have learnt an important lesson about how to write C correctly. If FreeBSD hides/protects me from this sort of mistake in my coding then I don't think it's upholding and encouraging a high standard of coding. -- Paul Richards