Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!ames!killer!texbell!bigtex!milano!pp!riunite!rfg From: rfg@riunite.ACA.MCC.COM (Ron Guilmette) Newsgroups: comp.lang.c++ Subject: Re: #once cpp directive implemented! Message-ID: <126@riunite.ACA.MCC.COM> Date: 20 Mar 89 17:58:46 GMT References: <124@riunite.ACA.MCC.COM> <11338@ulysses.homer.nj.att.com> Reply-To: rfg@riunite.UUCP (Ron Guilmette) Organization: MCC Austin, Texas Lines: 38 In article <11338@ulysses.homer.nj.att.com> gsf@ulysses.homer.nj.att.com (Glenn Fowler[drew]) writes: >In article <124@riunite.ACA.MCC.COM>, rfg@riunite.ACA.MCC.COM (Ron Guilmette) writes: > >implementing > #once >as > #pragma once >would be more in line with the current standards efforts >since #pragma's may/must be ignored by certain implementations See my comments in another recent posting. I think this is a *bad* idea. >this would allow for: >(4) correctness for any errors/choices in the file identity > algorithm (excuse the os-dependent examples): > note that with NFS and RFS the same physical file accessed > by different paths may have different I intentionaly left loopholes in the way #once is implemented. If you want and/or need to circumvent it, you can easily do so by simply making multiple links (hard or symbolic) to a given include file, and then using different pathnames to include the file. The point about NFS/RFS and inodes is *not* relevant, because the ommission of re-included #once files is done of the basis of remembered pathnames, not on the basis of remembered inode numbers. The reason for this is simple. Some systems (e.g. VMS, MS-DOS) may not support the concept of inodes. Thus, using pathnames should be more portable. -- // Ron Guilmette - MCC - Experimental (parallel) Systems Kit Project // 3500 West Balcones Center Drive, Austin, TX 78759 - (512)338-3740 // ARPA: rfg@mcc.com // UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg