Ticket #158 (closed defect: fixed)

Opened 6 years ago

Last modified 18 months ago

if os(windows) does not work

Reported by: duncan Owned by:
Priority: high Milestone: Cabal-1.2
Component: Cabal library Version: 1.2.0
Severity: normal Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: 6.4.2 Platform: Linux

Description

The os condition currently uses the System.Info.os :: String to check if we're on the OS specified. This is bad and wrong since in GHC at least on Windows this string is "mingw32". For configurations it's ok if this works:

if os(mingw32)
   blah

but it's essential that this works:

if os(windows)
   blah

At a bare minimum we should add an alias system, such that we can specify windows and solaris rather than the cryptic mingw32 and solaris2. I suggest that comparisons also be case insensetive.

Change History

Changed 6 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

Fixed in Cabal HEAD. Should get moved to the 1.2 branch soon.

Changed 18 months ago by elga

Note: See TracTickets for help on using tickets.