🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.dec
Article #4522

Re: errno.h problems in DEC 'C'

#4522
From: David Claude Brown
Date: Fri, 04 Aug 1995 17:45
44 lines
1947 bytes
In article <3vqrg1$bem@caip.rutgers.edu> halasz@caip.rutgers.edu writes:
>In article <danpop.807407394@rscernix>, Dan.Pop@mail.cern.ch (Dan Pop) writes
>! It's all your fault.  Here's the relevant part of the standard:
>! 
>!     4.1.3 Errors <errno.h>
>! 
>!     The header <errno.h> defines several macros, all relating to the
>!     reporting of error conditions.
>! 
>!        The macros are 
>!            ^^^^^^
>!            EDOM
>!            ERANGE
>! 
>!     which expand to distinct nonzero integral constant expressions; and 
>! 
>!            errno
>! 
>!     which expands to a modifiable lvalue that has type int...
>!           ^^^^^^^

>The standard looks wrong to me ....
>full of traps for the innocent.

The innocent would not use identifiers defined by the standard for their own 
purposes even if the standard allowed them too.

Name space management is _extremely_ important (IMHO) and is one of VMS's 
strengths. Perhaps the people who wrote the original 'errno' member had 
been lulled by VMS into thinking that they could do no wrong (no $ => OK)

I suggest a global subsititute of '.errno' and '->errno' to a new name as a 
first pass.  These two strings won't show up very often (if at all) in your 
programs other than in the places that you want to change them.

Claude.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 vv    vv       David Claude Brown
 ||----||  *    brown@falam.ch
 ||     | /
 /\------/
(oo)
(~~)
Technical Details
Message-ID: <brown.314.0013C00B@falam.ch>
Path: arc1-ca.pugleaf.net!brown.dial.eunet.ch!brown
References: <3vo921$n4a@pheidippides.axion.bt.co.uk> <danpop.807407394@rscernix> <3vqrg1$bem@caip.rutgers.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.dec,comp.lang.c
Path: arc1-ca.pugleaf.net!brown.dial.eunet.ch!brown
From: brown@falam.ch (David Claude Brown)
Subject: Re: errno.h problems in DEC 'C'
Message-ID: <brown.314.0013C00B@falam.ch>
Sender: usenet@eunet.ch
Organization: Falam Holdings Pty Ltd
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
References: <3vo921$n4a@pheidippides.axion.bt.co.uk> <danpop.807407394@rscernix> <3vqrg1$bem@caip.rutgers.edu>
Date: Fri, 4 Aug 1995 17:45:52 GMT