From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Wed, 2 Aug 2000 09:39:05 +0000 From: "Douglas A. Gwyn" Message-ID: <3987E4B0.FEA6B593@home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <8m6dhf$74d$1@inputplus.demon.co.uk>, <200008011603.MAA05857@egyptian-gods.MIT.EDU> Subject: Re: [9fans] Installing the updates Topicbox-Message-UUID: f2700dfa-eac8-11e9-9e20-41e7f4b1d025 Greg Hudson wrote: > a low cost (and one which can be optimized away for ifdef-protected > headers; I'm told gcc does so). The general trick is for the preprocessor to maintain a table of (lock_symbol,header_name) entries, and when a new header file is read, to make a note whether it consists of #ifndef symbol...#endif (after comment processing). If so, the symbol and file name go into the table. #include processing always checks the table and if there is an entry for the file, if the associated lock_symbol is defined, the file is not even opened. This trick does no harm.