Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!itk.unit.no!harald From: harald@itk.unit.no Newsgroups: comp.windows.x Subject: #if in resource file? Message-ID: <9002061248.AA14255@tone> Date: 6 Feb 90 13:50:19 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 38 I am trying to detect the server type in my resource file: #if VENDOR == "MIT X Consortium" .... #endif This is based on the predefined symbols in xrdb: % xrdb -s -DHOST=unix -DSERVERHOST=unix -DCLIENTHOST=tone -DVERSION=11 -DREVISION=0 -DVEN DOR="MIT X Consortium" -DRELEASE=4 -DWIDTH=1152 -DHEIGHT=900 -DX_RESOLUTION=3545 -DY_RESOLUTION=3543 -DPLANES=8 -DBITS_PER_RGB=8 -DCLASS=PseudoColor -DCOLOR But my test in the resource file fails: % xrdb -merge resourcefile 34: syntax error (in preprocessor if) Why? System: X11R4, SunOS 4.0.3.c, Sun4 Regards, Harald Backer //////////////////////////////////////////////////////////////////////// / Harald Backer / harald@itk.unit.no / / SINTEF Automatic Control / (+47 7) 594375 Switchboard / / The Norwegian Institute of Technology / (+47 7) 594399 Fax / / N-7034 Trondheim / / / NORWAY / / //////////////////////////////////////////////////////////////////////// BTW, how can I store a symbol in the resource data base - permanently? In %xrdb -Dsym=value resourcefile the definition of `sym' lasts only for this single run.