From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: VBE Bankswitch in Pmode Date: Wed, 11 Jun 1997 19:54:17 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 21 Message-ID: <339F0269.6F93@cs.com> References: <339C40FA DOT 15F9 AT piper DOT hamline DOT edu> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp108.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Paul Shirley wrote: > > The gnu make/cpp documentation claims that it can spot this sort of > enclosure in include files and avoid loading them more than once. > > Anyone know if it actually works? (I just assumed it would) When I write my own header files and accidentally include them twice in the same source file, I get all sorts of errors about multiply defined constants and duplicate struct definitions and lots of other stuff. Using the #ifndef __header_h__/#define __header_h__/.../#endif trick solves the problem perfectly. Plus, it's the standard way to handle it. What else could you ask for? -- --------------------------------------------------------------------- | John M. Aldrich | "Be wary of strong drink. It can | | aka Fighteer I | make you shoot at tax collectors-- | | mailto:fighteer AT cs DOT com | and miss." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------