[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Problem in library code using library functions
From: |
Paolo Faraboschi |
Subject: |
RE: Problem in library code using library functions |
Date: |
Mon, 5 Feb 2001 18:07:03 -0500 |
>
> Where is this specified by POSIX? Please give me the reference -
> without any normative reference there will not be any change in this
> area.
>
> ISO C 99 defines strrchr and thereby AFAIU forbids such redefinition
> in user space.
>
> Andreas
> --
> Andreas Jaeger
> SuSE Labs address@hidden
> private address@hidden
> http://www.suse.de/~aj
>
Well, it turns out that you are right, here's what the C99 standard says
concerning reserved names (from ISO/IEC 9899:1999), in chapter "7. Library". I
believe that this was different in the C89 standard.
I think that the 3rd bullet covers it, since "all identifiers with external
linkage in any of the following subclauses" certainly covers the usual
suspect....
Sorry for the disruption, and keep up the good work.
-- Paolo
================================================================
7.1.3 Reserved identifiers
1 Each header declares or defines all identifiers listed in its associated
subclause, and
optionally declares or defines identifiers listed in its associated future
library directions
subclause and identifiers which are always reserved either for any use or for
use as file
scope identifiers.
All identifiers that begin with an underscore and either an uppercase letter
or another
underscore are always reserved for any use.
All identifiers that begin with an underscore are always reserved for use as
identifiers
with file scope in both the ordinary and tag name spaces.
Each macro name in any of the following subclauses (including the future
library
directions) is reserved for use as specified if any of its associated headers
is included;
unless explicitly stated otherwise (see 7.1.4).
All identifiers with external linkage in any of the following subclauses
(including the
future library directions) are always reserved for use as identifiers with
external
linkage.154)
Each identifier with file scope listed in any of the following subclauses
(including the
future library directions) is reserved for use as a macro name and as an
identifier with
file scope in the same name space if any of its associated headers is included.
2 No other identifiers are reserved. If the program declares or defines an
identifier in a
context in which it is reserved (other than as allowed by 7.1.4), or defines a
reserved
identifier as a macro name, the behavior is undefined.
3 If the program removes (with #undef) any macro definition of an identifier in
the first
group listed above, the behavior is undefined.
================================================================