Mail Archives: cygwin/1997/10/28/20:17:10
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".
- Raw text -