Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!ast@cs.vu.nl From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.unix.questions Subject: Some questions about POSIX headers Message-ID: <4508@ast.cs.vu.nl> Date: 10 Nov 89 23:45:34 GMT Sender: ast@cs.vu.nl Reply-To: ast@cs.vu.nl (Andy Tanenbaum) Organization: VU Informatica, Amsterdam Lines: 22 I have several questions about POSIX P1003.1. Consider the following excerpt from : #define _LOW(__v) ( (__v) & 0377) #define _HIGH(__v) ( ((__v) >> 8) & 0377) #define WIFEXITED(__s) (_LOW(__s) == 0) /* normal exit */ #define WEXITSTATUS(__s) (_HIGH(__s)) /* exit status */ #define WTERMSIG(__s) (_LOW(__s) & 0177) /* sig value */ #define WIFSIGNALED(__s) (_HIGH(__s) == 0 && __s != 0) /* signaled */ 1. Is it legal to have _LOW and _HIGH here (name space pollution rules)? 2. Are the parameters __s and __v required to begin with __ (again, name space pollution rules)? 3. WIFSIGNALED evaluates __s twice. Is this legal? In an ANSI C header it is specifically forbidden. What about POSIX? 4. Is the extra set of parenthesis around __v in _HIGH() really required? 5. What is the best newsgroup for asking this sort of question? Thanks. Andy Tanenbaum (ast@cs.vu.nl)