Date: Thu, 28 May 1998 11:35:33 +1000 From: Bruce Evans <bde@zeta.org.au> To: mike@smith.net.au, wollman@khavrinen.lcs.mit.edu Cc: current@FreeBSD.ORG Subject: Re: Argh! errno spam! Message-ID: <199805280135.LAA00604@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 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 <errno.h>. >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805280135.LAA00604>