From: bzinger AT iname DOT com (Michael A. Benzinger) Subject: Re: cpp - conditional expressions inder win95 differ to under Unix 28 Oct 1997 20:17:10 -0800 Message-ID: <3.0.5.32.19971028154019.00933a90.cygnus.gnu-win32@pop.flash.net> References: <9710281241 DOT AA04162 AT ss38 DOT wg DOT icl DOT co DOT uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: kh AT wg DOT icl DOT co DOT uk (Kevin Hughes), gnu-win32 AT cygnus DOT com Hi again, Kevin, I am not 100% sure, but I don't believe that comparing a #define variable to a character string is ISO/ANSI standard. I thought that you could only use numbers for comparison. I could be wrong though. I believe you can only determine if they are defined but not what their value is. Mike Benzinger At 12:41 PM 10/28/97 GMT, Kevin Hughes wrote: >I have been using the gnu tools on UNIX for some considerable time and find >them very good. Recently I have been trying to move to NT :-( and have been >using the gnu port to win32. I have had some problems that the list has >managed to sort out or point me in the right direction. I have just come across >one I just cannot understand > >I have code which has many tests for the OS on which it will run, done via >CPP. Hence I have code like > >#if PLATFORM_OS == solaris > > >#endif > >#if PLATFORM_OS == win32 > > >#endif > >With the value of PLATFORM_OS being passed in via the build system I use. > >This works great on SOLARIS/SUNOS/UNIXWARE (2.7.2/egcs etc) but I cannot get >it to work on the Win32 environment. It apepars to go down all paths - as if >PLATFORM_OS is not defined OR the individual checks are ALWAYS satisfied. > >I have added a guranteed fail line > >PLATFORM_OS > >before any tests and get a compiler message indicating that win32 does not exist >so the value is right. > >Anyone any ideas? > >Thanks > > Kevin >- >For help on using this list (especially unsubscribing), send a message to >"gnu-win32-request AT cygnus DOT com" with one line of text: "help". > > - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".