🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.dec
Article #4515

errno.h problems in DEC 'C'

#4515
From: Greg Thomas
Date: Wed, 02 Aug 1995 16:29
35 lines
1459 bytes
Hi,

I'm trying to porting some code to Alpha/DEC 'C' from VAX/VAX 'C'. We have, 
however, hit a problem with the <errno.h> include file. It #defines it to be 
(*cma$tis_errno_get_addr()). The trouble is, we have number of structures that 
have an errno as an element. Of course, this gets expanded to the above 
function, and so it won't compile. ie ...

#include <errno.h>

/* Which then does the following define ... 
#define errno (*cma$tis_errno_get_addr())
*/

struct test 
{
	long errno;
/* which gets expanded to 
	long (*cma$tis_errno_get_addr());
   which of course will not compile 
*/
};

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?

Thanks for any help,


Greg Thomas
---
Tel (01473) 224832
Fax (01473) 233319
Technical Details
Message-ID: <3vo921$n4a@pheidippides.axion.bt.co.uk>
Path: arc1-ca.pugleaf.net!dish.news.pipex.net!pipex!bt!pc0921

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dish.news.pipex.net!pipex!bt!pc0921
From: thomasgd@boat.bt.com (Greg Thomas)
Newsgroups: comp.sys.dec,comp.lang.c
Subject: errno.h problems in DEC 'C'
Date: Wed, 02 Aug 95 16:29:24 GMT
Organization: BT Labs, Ipswich
Message-ID: <3vo921$n4a@pheidippides.axion.bt.co.uk>
NNTP-Posting-Host: 132.146.36.72
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Newsreader: News Xpress Version 1.0 Beta #4