Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!mephisto!udel!haven!uvaarpa!mmdf From: aks@hub.ucsb.edu, , ks@somewhere (Alan Stebbens) Newsgroups: comp.lang.perl Subject: Re: Problems with DS3100 'cc' defines .vs. /usr/lib/cpp Message-ID: <2735@uvaarpa.virginia.edu> Date: 22 Feb 90 18:26:05 GMT Sender: mmdf@uvaarpa.virginia.edu Reply-To: aks@hub.ucsb.edu Lines: 28 Evans> I had sent larry a posible patch to this problem not very Evans> long after the last patch level was sent out (PL8). The Evans> basic idea is that the compiler set the symbol LANGUAGE_C Evans> if the filename ends in '.c'. This allows more then one Evans> language to use the include file(s), such as the assembler. Evans> Therefore, if you are reading from stdin, the constant is Evans> not set automajically. The work around is to invoke the Evans> pre-processor with a -DLANGUAGE_C in the case of MIPS based Evans> compilers. This takes care of some of the problems, but on the DS3100 also wants "mips" to be defined. Here is the line in question from /usr/include/signal.h: #if defined(vax) || (defined(mips) && defined(LANGUAGE_C)) Notice that both "mips" and "LANGUAGE_C" need to be defined. I can also imagine similar cases on other systems where the "standard" defines are supplied by "cc", and not by "cpp". Again, in my opinion, the simplest case is to try to let "cc" do the invocation of "cpp". The other alternative is to try and figure out the standard defines applied by the compiler, but not by the precompiler. This is doable on DECstations and Suns, but differently, and on other systems this may be impossible. Alan Stebbens