This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Namespace pollution?


>  KK> Identifiers that begin with an underscore and a lower case letter
>  KK> or digit are merely reserved as file scope identifiers in the
>  KK> ordinary and tag namespace. At least in C89.
> 
> Posix agrees From the same page:
>     2. All identifiers that begin with an underscore are always
>        reserved for use as identifiers with file scope in both the
>        ordinary identifier and tag name spaces.  
> 
> More inbreeding :]
> 
> Wow, this is a real interesting discrepncy between the API atandards
> and the ABI spec.
> 

Not really. It says "identifiers with file scope", i.e. functions and
variables declared "static", and macros. I think this goes beyond the
set of reserved names in ISO C, but still it does not make "_write"
(or "_uname") reserved as a global symbol. I think the primary
application is that you can name macros with that convention.

> The SYSV ABI
> http://www.sco.com/developer/devspecs/gabi41.pdf
>   Page 6-3 System Service Synonyms
>   ...
>     name    This gives the traditional name, such as read.
>     _name   This gives a system service name that follows the ANSI C
>     convention of reserving symbols beginning with an underscore, such
>     as _read. 
> 
> a contradiction??

Given my interpretation of the Posix/Unix rules, I'd say that this ABI
definition reserves names that are still available to the application
according to Posix.

Regards,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]