delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/11/08:49:39

From: Paul Shirley <Paul AT no DOT spam DOT please>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: VBE Bankswitch in Pmode
Date: Tue, 10 Jun 1997 18:28:55 +0100
Organization: wot? me?
Distribution: world
Message-ID: <R6MBNFAX7YnzEwtn@foobar.co.uk>
References: <339C40FA DOT 15F9 AT piper DOT hamline DOT edu>
Reply-To: Paul Shirley <Paul AT chocolat DOT obvious DOT fake DOT foobar DOT co DOT uk>
NNTP-Posting-Host: chocolat.foobar.co.uk
Mime-Version: 1.0
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <339C40FA DOT 15F9 AT piper DOT hamline DOT edu>, Randall Maas
<rcmaas AT piper DOT hamline DOT edu> writes
>>> #if !defined(__GO32_H)
>>> #include <go32.h>
>>> #endif
>
>>All those #ifs and #endifs are redundant: all of the header files in
>>question are idempotent, that is wrapped in the same #ifs inside
>>themselves to begin with. All header files that are distributed with >DJGPP 
>are. Any decent header file is...
>
>True.  But having those checks inside our your .c .h files is also
>good.  If you didn't, the cpp has to *load* and *parse* the .h file
>again, even though it adds nothing.  By checking to see if you already
>included it, you can save yourself the load and scan time.  (Of course,
>a good file cache also helps trim down the load time).

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)

---
Paul Shirley: my email address is 'obvious'ly anti-spammed

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019