This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cpp - conditional expressions inder win95 differ to under Unix


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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]