Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ames!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: #if in resource file? Message-ID: <47553@lll-winken.LLNL.GOV> Date: 6 Feb 90 21:55:06 GMT References: <9002061248.AA14255@tone> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 16 | From: harald@itk.unit.no | | I am trying to detect the server type in my resource file: | | #if VENDOR == "MIT X Consortium" | .... | #endif | | But my test in the resource file fails: | | % xrdb -merge resourcefile | 34: syntax error (in preprocessor if) That's because cpp only knows how to compare numeric constants with "==". You'll have to think up a way to cast what you want to do into a numeric or boolean (#ifdef) domain. You can't compare strings.