Some questions about POSIX headers

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Nov 15 02:44:32 AEST 1989


In article <4508 at ast.cs.vu.nl> ast at cs.vu.nl (Andy Tanenbaum) writes:
>1. Is it legal to have _LOW and _HIGH here (name space pollution rules)?

Yes; they're in the name space reserved for the implementation.

>2. Are the parameters __s and __v required to begin with __ (again, name
>   space pollution rules)?

It doesn't matter one way or the other.  Parameter names in the macro
definition are not visible elsewhere.

>3. WIFSIGNALED evaluates __s twice.  Is this legal?  In an ANSI C header
>   it is specifically forbidden.  What about POSIX?

Unfortunately I don't have my copy of IEEE Std 1003.1 on hand.
Whether or not 1003.1 specified this I don't recall, but I doubt it.
On the other hand it probably SHOULD have been specified, so the
implementation would be better if it obeyed that constraint.

>4. Is the extra set of parenthesis around __v in _HIGH() really required?

Yes, to ensure proper operator binding when the actual argument is
an expression.

>5. What is the best newsgroup for asking this sort of question?

Probably comp.std.c, although for more POSIX-specific questions
comp.std.unix might be better.



More information about the Comp.unix.questions mailing list