Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!uunet.UU.NET!sef From: ro@thp.uni-koeln.de (Rainer Orth) Newsgroups: comp.std.unix Subject: Must POSIX 1003.1 include files be standalone? Message-ID: <1991May12.181445.4553@uunet.uu.net> Date: 11 May 91 04:06:15 GMT Sender: usenet@uunet.uu.net (UseNet News) Organization: Institute of Theoretical Physics, University of Cologne, F. R. Lines: 36 Approved: sef@uunet.uu.net (Moderator, Sean Eric Fagan - comp.std.unix) Originator: sef@uunet.UU.NET Nntp-Posting-Host: uunet.uu.net X-Submissions: std-unix@uunet.uu.net Submitted-by: ro@thp.uni-koeln.de (Rainer Orth) Recently while working on the command sources of Andy Tanenbaums Minix 1.6 (currently in beta and trying to become fully P1003.1 and .2 compatible), there appeared the question whether code like #include int main (void) { } is required to work in a strictly conforming POSIX.1 implementation with Standard C Bindings. The problem is as follows: contains a prototype for struct passwd *getpwuid (uid_t) and doesn't include by itself. I'm not shure if the above program needs to #include itself or is wrong. From P1003.1-1988 needs to be included only if the program uses getpwuid(). The same problem occurs in several other headers: e.g. , , , . Does P1003.1-1990 specify the correct behaviour? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Institute of Theoretical Physics, University of Cologne Internet: ro@thp.Uni-Koeln.DE Volume-Number: Volume 23, Number 65