From owner-freebsd-current Fri May 29 19:07:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA26283 for freebsd-current-outgoing; Fri, 29 May 1998 19:07:34 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp04.primenet.com (root@smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA26276 for ; Fri, 29 May 1998 19:07:24 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id OAA09010; Fri, 29 May 1998 14:00:12 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp04.primenet.com, id smtpda29416; Fri May 29 12:47:23 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id MAA29647; Fri, 29 May 1998 12:47:15 -0700 (MST) From: Terry Lambert Message-Id: <199805291947.MAA29647@usr07.primenet.com> Subject: Re: Argh! errno spam! To: mike@smith.net.au (Mike Smith) Date: Fri, 29 May 1998 19:47:14 +0000 (GMT) Cc: wollman@khavrinen.lcs.mit.edu, mike@smith.net.au, current@FreeBSD.ORG In-Reply-To: <199805272034.NAA01753@dingo.cdrom.com> from "Mike Smith" at May 27, 98 01:34:17 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Any C program which has a structure member called `errno' is > > erroneous. > > How so? Structure members have been allowed to be non-unique for a > while now; I don't recall there being constraints on globals vs. > structure members at all. > > There are a few perfectly good reasons to call a structure member errno, > but regardless of the good reasons, I fear for the code in the ports > collection. 8( > > I was bitten by this with the NetBSD-derived bootcode I'm working on, > which doesn't use libc and thus needs its own errno in order to be a > reasonable facsimile therof. (Yes, I have a workaround.) Any code which does not use libc, has a structure member called `errno', and still includes errno.h... is erroneous. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message