Re: How to use #ifdef WIN32

2007-12-28 Thread Duncan Coutts
On Fri, 2007-12-21 at 00:11 -0600, Spencer Janssen wrote: > On Thursday 20 December 2007 22:04:13 Duncan Coutts wrote: > > On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote: > > > If you're using Cabal, something like this should work: > > > > > > if os(win32) > > > cpp-options:

Re: How to use #ifdef WIN32

2007-12-20 Thread Spencer Janssen
On Thursday 20 December 2007 22:04:13 Duncan Coutts wrote: > On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote: > > If you're using Cabal, something like this should work: > > > > if os(win32) > > cpp-options: -DWIN32 > > To be precise: > > if os(windows) > cpp-option

Re: How to use #ifdef WIN32

2007-12-20 Thread Duncan Coutts
On Thu, 2007-12-20 at 21:16 -0600, Spencer Janssen wrote: > If you're using Cabal, something like this should work: > > if os(win32) > cpp-options: -DWIN32 To be precise: if os(windows) cpp-options: -DWIN32 See, Cabal is (mostly) Neil "I hate mingw" Mitchell compliant.

Re: How to use #ifdef WIN32

2007-12-20 Thread Spencer Janssen
On Thursday 20 December 2007 18:37:15 Jim Burton wrote: > I want to switch code on the OS but this always goes through to the #else > (on windows or elsewhere): > > {-# OPTIONS -cpp #-} > #ifdef WIN32 > main = putStrLn "hello windows" > #else > main = putStrLn "hello something else" > #endif > > Do

Re: How to use #ifdef WIN32

2007-12-20 Thread Jim Burton
Neil Mitchell wrote: > Hi Jim > > > > #if defined(mingw32_HOST_OS) || defined(__MINGW32__) > > Thanks Neil, Jim > > > > If you want to test for Windows you have to ask whether an unrelated > system is installed on your machine. Even if it isn't, you still have > to test this value. This is w

Re: How to use #ifdef WIN32

2007-12-20 Thread Neil Mitchell
Hi Jim > I want to switch code on the OS but this always goes through to the #else (on > windows or elsewhere): > > {-# OPTIONS -cpp #-} > #ifdef WIN32 > main = putStrLn "hello windows" > #else > main = putStrLn "hello something else" > #endif > > Does this depend on a Makefile setting WIN32, or s

How to use #ifdef WIN32

2007-12-20 Thread Jim Burton
d there be something predefined? Thanks, -- View this message in context: http://www.nabble.com/How-to-use--ifdef-WIN32-tp14448173p14448173.html Sent from the Haskell - Glasgow-haskell-users mailing list archive at Nabble.com. ___ Glasgow-haskell-users