This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
cpp - conditional expressions inder win95 differ to under Unix
- To: gnu-win32 at cygnus dot com
- Subject: cpp - conditional expressions inder win95 differ to under Unix
- From: kh at wg dot icl dot co dot uk (Kevin Hughes)
- Date: Tue, 28 Oct 97 12:41:31 GMT
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".