From owner-freebsd-i18n Wed Mar 21 13:40: 2 2001 Delivered-To: freebsd-i18n@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 92F5037B71C; Wed, 21 Mar 2001 13:39:56 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id QAA22473; Wed, 21 Mar 2001 16:39:44 -0500 (EST) (envelope-from wollman) Date: Wed, 21 Mar 2001 16:39:44 -0500 (EST) From: Garrett Wollman Message-Id: <200103212139.QAA22473@khavrinen.lcs.mit.edu> To: "Andrey A. Chernov" Cc: current@FreeBSD.ORG, i18n@FreeBSD.ORG Subject: Re: Request for review [Re: /bin/ls patch round #2] In-Reply-To: <20010322002607.A19574@nagual.pp.ru> References: <20010319195438.A43266@peorth.iteration.net> <20010320002043.A46115@peorth.iteration.net> <20010320065321.E63933668@203.141.142.186.user.am.il24.net> <200103201736.MAA09185@khavrinen.lcs.mit.edu> <20010321040241.C97FC3668@203.141.142.186.user.am.il24.net> <200103212119.QAA22140@khavrinen.lcs.mit.edu> <20010322002607.A19574@nagual.pp.ru> Sender: owner-freebsd-i18n@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > This particular case is different from what you say. There is no strict > POSIX/ISO C equivalent of functionality you describe, Certainly there is. The daemon(3) function is implemented entirely on top of POSIX interfaces: fork(), setsid(), chdir(), open(), dup2(), and close(). It is supplied because many programs which attempt to do this from scratch get it wrong. Similarly, err(3) could be entirely implemented in terms of ISO C primitives: vfprintf(), strerror(), and exit(). The style guide recommends its use because err() is a simpler interface, thus harder to get wrong than rolling one's own. strsep(3) is another similar example. > I.e. when two implementations does the same thing, POSIX/ISO C > variant is preferred. Erm, no -- the superior version is preferred. (Something of a tautology.) FreeBSD has never been about slavish adherence to standards; while we prefer to follow relevant standards, if the standards are broken we do our own thing, and that goes doubly so for the way we code the standard utilities. That doesn't mean we shouldn't implement et al, but it does mean that we should use whichever facilities are cleanest, and easiest to code for and maintain, rather than those which are specifically blessed by an ISO working group. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-i18n" in the body of the message