Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Lawrence Kirby <fred@genesis.demon.co.uk>
Subject: Re: errno.h problems in DEC 'C'
Date: 1995/08/02	[thread overview]
Message-ID: <807403941snz@genesis.demon.co.uk> (raw)
In-Reply-To: 3vo921$n4a@pheidippides.axion.bt.co.uk

In article <3vo921$n4a@pheidippides.axion.bt.co.uk>
           thomasgd@boat.bt.com "Greg Thomas" writes:

>Now whilst I can change all our code to not refer to errno in this structure, 
>I feel that the DEC 'C' errno.h does not have correct behaviour in it. Is the 
>DEC 'C' compiler in error (my K&R 2nd Ed does refer to errno as an integer, 
>but that's all), or am I not allowed to do this?

From the standard

"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 the program defines an identifier with the name errno,
the behaviour is undefined".

Given that and the fact that a structure member name is an identifier
Dec 'C's implementation is correct and the fault is with the code.

-- 
-----------------------------------------
Lawrence Kirby | fred@genesis.demon.co.uk
Wilts, England | 70734.126@compuserve.com
-----------------------------------------



  parent reply	other threads:[~1995-08-02  4:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-02  4:00 errno.h problems in DEC 'C' Greg Thomas
1995-08-02  4:00 ` Dan Pop
1995-08-03  4:00   ` halasz
1995-08-04  4:00     ` David Claude Brown
1995-08-04  4:00     ` Dan Pop
1995-08-02  4:00 ` Lawrence Kirby [this message]
1995-08-02  4:00 ` J. Daniel Smith
1995-08-03  4:00 ` David Claude Brown
1995-08-03  4:00 ` Derick J.R. Qua-Gonzalez
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox