From owner-freebsd-current Wed May 27 18:35:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA26961 for freebsd-current-outgoing; Wed, 27 May 1998 18:35:39 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA26948 for ; Wed, 27 May 1998 18:35:35 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id LAA00604; Thu, 28 May 1998 11:35:33 +1000 Date: Thu, 28 May 1998 11:35:33 +1000 From: Bruce Evans Message-Id: <199805280135.LAA00604@godzilla.zeta.org.au> To: mike@smith.net.au, wollman@khavrinen.lcs.mit.edu Subject: Re: Argh! errno spam! Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> Any C program which has a structure member called `errno' is >> erroneous. Actually, only ones that declare or reference such a struct member after including . >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. Macro scope is different from global scope. >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'd like the ports collection to be compiled routinely under -current. Even if it doesn't compile, the breakage list would be interesting. >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.) errno shouldn't be defined for non-libc interfaces. You probably got bitten by namespace pollution. KERNEL must be defined to stop errno being defined in our errno.h. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message