From owner-freebsd-hackers Sun Nov 22 09:29:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA24099 for freebsd-hackers-outgoing; Sun, 22 Nov 1998 09:29:15 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ceia.nordier.com (m2-58-dbn.dial-up.net [196.34.155.122]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA24077; Sun, 22 Nov 1998 09:29:03 -0800 (PST) (envelope-from rnordier@nordier.com) Received: (from rnordier@localhost) by ceia.nordier.com (8.8.7/8.6.12) id TAA07219; Sun, 22 Nov 1998 19:27:27 +0200 (SAT) From: Robert Nordier Message-Id: <199811221727.TAA07219@ceia.nordier.com> Subject: Re: errno In-Reply-To: from "nectar@FreeBSD.ORG" at "Nov 22, 98 10:04:21 am" To: nectar@FreeBSD.ORG Date: Sun, 22 Nov 1998 19:27:25 +0200 (SAT) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG nectar@FreeBSD.ORG wrote: > The following code snippet won't compile on -CURRENT, or on -STABLE with > _THREAD_SAFE defined due to ``errno'' being a macro in : > > #include > struct example { > int errno; > }; > > I understand why, but is this code incorrect ANSI C? I'm just > trying to find a reference that prohibits this use. 7.1.4: .... It is unspecified whether errno is a macro or an identifier declared with external linkage. If a macro definition is suppressed in order to access an actual object, or a program defines an identifier with the name errno, the behavior is undefined. -- Robert Nordier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message