Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > E*

Reply
 
 
Richard Tobin
Guest
Posts: n/a
 
      05-10-2008
7.26.3 Errors <errno.h>
Macros that begin with E and a digit or E and an uppercase letter
may be added to the declarations in the <errno.h> header.

May an implementation define an error macro EOF with a value different
from the EOF in <stdio.h>?

-- Richard
--
:wq
 
Reply With Quote
 
 
 
 
lawrence.jones@siemens.com
Guest
Posts: n/a
 
      05-11-2008
Richard Tobin <(E-Mail Removed)> wrote:
> 7.26.3 Errors <errno.h>
> Macros that begin with E and a digit or E and an uppercase letter
> may be added to the declarations in the <errno.h> header.
>
> May an implementation define an error macro EOF with a value different
> from the EOF in <stdio.h>?


No. A strictly conforming program is allowed to include both headers
and the conflicting definitions of EOF would violate the constraint in
6.10.3p2. Since a conforming implementation is not allowed to have
entensions that invalidate strictly conforming programs, such a
definition is not allowed.

Conformance questions like this really belong in comp.std.c where
there's less traffic, much less heat, and far more light than there is
here.

-- Larry Jones

I think we need to change the rules. -- Calvin
 
Reply With Quote
 
 
 
 
Harald van Dijk
Guest
Posts: n/a
 
      05-11-2008
On Sun, 11 May 2008 09:01:36 -0400, Eric Sosman wrote:
> Richard Tobin wrote:
>> 7.26.3 Errors <errno.h>
>> Macros that begin with E and a digit or E and an uppercase letter
>> may be added to the declarations in the <errno.h> header.

>
> The paragraph can be read as a warning and as an implied
> promise. First, it warns you not to use EEYORE for your own purposes,
> because a future <errno.h> might define it. And second, it implies that
> future <errno.h> versions will *not* define E12MANY or EiEiO or
> E_IS_FOR_ELEPHANT, so you can use those identifiers as you wish.


Why can't E12MANY be defined? It's a macro that begins with E and a digit,
which is allowed, right? I'm asking because E2BIG is a fairly common real-
world macro provided by <errno.h>.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments