Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!usc!orion.oac.uci.edu!uci-ics!rfg From: rfg@ics.uci.edu (Ron Guilmette) Newsgroups: comp.lang.c++ Subject: Re: A solution to the multiple inclusion problem Message-ID: <1989Oct27.170429.14184@paris.ics.uci.edu> Date: 28 Oct 89 00:04:29 GMT References: Reply-To: Ron Guilmette Organization: University of California, Irvine - Dept of ICS Lines: 24 In article dld@F.GP.CS.CMU.EDU (David Detlefs) writes: >Conclusion: IMHO, anybody who's read Nagle's post and implements a C >preprocessor (or compiler that incorporates one) and doesn't use the >technique doesn't recognize a good thing when it walks up and sits in >his/her lap. Even if your CPP incorporates a mechanism such as >#pragma once, this will still help if the compiler is used on any of >the vast existing body of code that doesn't use #pragma once. Regarding that "vast existing body of code", I have a little csh script for you: #!/bin/csh foreach file (*.h) cp $file /tmp/$file rm -f $file echo #pragma once > $file cat /tmp/$file >> $file rm -f /tmp/$file end If you don't grok csh, I will interpret. // rfg