Article View: comp.std.unix
Article #116Re: Query about multiple inclusion of a header
From: Jeffrey Kegler
Date: Thu, 23 Nov 1989 22:55
Date: Thu, 23 Nov 1989 22:55
26 lines
1611 bytes
1611 bytes
From: jeffrey@algor2.algorists.com (Jeffrey Kegler) In article <436@longway.TIC.COM> Andy Tanenbaum <uunet!cs.vu.nl!ast> writes: >From: Andy Tanenbaum <uunet!cs.vu.nl!ast> > >The ANSI C standard specifically states that it is legal for an >application program to include the ANSI headers (e.g., <limits.h>) >multiple times in a program. > >What about the POSIX headers that are not in the ANSI std, such as ><unistd.h> and <sys/wait.h>. 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
Technical Details
Message-ID:
<440@longway.TIC.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!longway!std-unixReferences:
<436@longway.TIC.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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)