From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,72307b873fdffce6 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,72307b873fdffce6 X-Google-Attributes: gid1014db,public From: Lawrence Kirby Subject: Re: errno.h problems in DEC 'C' Date: 1995/08/02 Message-ID: <807403941snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 107424148 x-nntp-posting-host: genesis.demon.co.uk references: <3vo921$n4a@pheidippides.axion.bt.co.uk> organization: none reply-to: fred@genesis.demon.co.uk newsgroups: comp.sys.dec,comp.lang.c 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 -----------------------------------------