From owner-cvs-all Wed Jan 10 21:37: 6 2001 Delivered-To: cvs-all@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id EB2A737B400; Wed, 10 Jan 2001 21:36:44 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id AAA02408; Thu, 11 Jan 2001 00:36:17 -0500 (EST) Date: Thu, 11 Jan 2001 00:36:17 -0500 (EST) From: Daniel Eischen To: Garrett Wollman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: errno in libc (was Re: cvs commit: src/sys/alpha/alpha interrupt.c machdep.c mp_mac) In-Reply-To: <200101110515.AAA42400@khavrinen.lcs.mit.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 11 Jan 2001, Garrett Wollman wrote: > < said: > > > Should I discard these changes, or is _set_errno(x) seen as a better > > interface than errno = x? > > The latter is required to work in the API. Library internals may be > different, but I would suggest that breaking `errno' just in the > library would be a poor choice. I'm not changing any interfaces or breaking anything. I just changed all libc internal settings of errno to use _set_errno(x) instead of errno = x. Using errno = x in libc will still work. I guess the question is, what would we rather see used internally in libc? It should probably be consistent either way. I've already done the grunt work of changing errno = x to _set_errno(x), so the effort to convert shouldn't be given any weight. I also don't care if I have to discard my changes. I'd rather see _set_errno(x) used internally in libc; it just seems easier to see that it can handle the threaded case. Using errno = x faked me out so much that I changed it ;-) But whatever -- I have no strong feelings either way. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message