Path: utzoo!attcan!uunet!cs.utexas.edu!longway!std-unix From: jeffrey@algor2.algorists.com (Jeffrey Kegler) Newsgroups: comp.std.unix Subject: Re: Query about multiple inclusion of a header Message-ID: <440@longway.TIC.COM> Date: 23 Nov 89 22:55:07 GMT References: <436@longway.TIC.COM> Sender: std-unix@longway.TIC.COM Reply-To: jeffrey@algor2.algorists.com (Jeffrey Kegler) Organization: Algorists, Inc. Lines: 26 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman) From: jeffrey@algor2.algorists.com (Jeffrey Kegler) In article <436@longway.TIC.COM> Andy Tanenbaum writes: >From: Andy Tanenbaum > >The ANSI C standard specifically states that it is legal for an >application program to include the ANSI headers (e.g., ) >multiple times in a program. > >What about the POSIX headers that are not in the ANSI std, such as > and . Is an implementation required to behave >correctly if they are included multiple times? If so, could somebody >point out the section in P1003.1 where this is stated. >From 2.8.1 of 1003.1: "Additionally, the C Standard requires that it be possible to include a header more than once, and that a symbol may be defined in more than one header. This requirement is also made of headers for this standard." This seems to say yes in answer to the above question. -- Jeffrey Kegler, Independent UNIX Consultant, Algorists, Inc. jeffrey@algor2.ALGORISTS.COM or uunet!algor2!jeffrey 1762 Wainwright DR, Reston VA 22090 Volume-Number: Volume 17, Number 68