Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!mandrill!decvax!gsg!lew From: lew@gsg.UUCP (Paul Lew) Newsgroups: comp.lang.c Subject: Re: cpp compatiblity Unix/VMS Message-ID: <229@gsg.UUCP> Date: 12 Aug 88 15:06:09 GMT References: <792@cernvax.UUCP> Organization: General Systems Group, Inc., Salem, NH Lines: 41 From article <792@cernvax.UUCP>, by hjm@cernvax.UUCP (hjm): > > #include foobar > #include> > are not the same if foobar is a logical name! Using logical > names allows for greater flexibility in where include files are > kept (you may not want them kept with all the others because of a > name conflict, or perhaps you just want to be tidy), whereas the > form is an absolute address. > Is there a version of cpp that will use Unix environment variables for include file names? This is something I like to have for a long time. The imake utility ditributed with X11 uses cpp symbols as the include file names. You may do something like: #ifdef vms #else #define foobar #endif #include foobar This works for BSD, 3B2, and Xenix systems. I like it because you can do things like: #ifdef BSD #define String_h #else #define String_h #endif and put all these in one file. There is no need to do #ifdef in every C files!! However, this works only if there is one to one mapping of the inlcude file which unfortunately is not true for a lot of them. Any remedy? -- Paul Lew {oliveb,harvard,decvax}!gsg!lew (UUCP) General Systems Group, 5 Manor Parkway, Salem, NH 03079 (603) 893-1000