Ticket #1280 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

System.Directory.getPermissions gives wrong answer on Vista

Reported by: simonmar Owned by: simonmar
Priority: high Milestone: 6.8.1
Component: Compiler Version: 6.6
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

access(X_OK,...) isn't supported by the C runtime on Vista (strictly speaking, it hasn't been supported on any Windows OS, but Vista checks the arguments a bit more carefully than earlier OSs). This means that System.Directory.getPermissions claims that everything is non-executable, and consequently Cabal fails when trying to invoke something via rawSystemPath (in Distribution.Simple.Utils).

This is making GHC's build fall over on Vista currently, so we need a fix/workaround (current workaround is to disable the getPermissions call in Distribution.Simple.Utils.rawSystemPath).

Change History

Changed 6 years ago by claus

the mingw folks seem to have a related fix for their 2007-03-26 mingw-runtime-3.12  release:

* include/io.h (__mingw_access): New static inline wrapper to restore 
pre-Vista 'access (fname, X_OK)' behaviour. 
(__USE_MINGW_ACCESS): Use to map access() to __mingw_access(). 

Changed 6 years ago by simonmar

The mingw fix restores the old behaviour, namely that X_OK is ignored, which effectively means that all files appear to be executable. Also they did it by adding an inline function to unistd.h, which means we'd need a C wrapper to get their fix.

I think we should implement this properly (whatever that means) in 6.8.

Changed 6 years ago by igloo

  • owner set to simonmar

Simon will be looking at the Vista problems

Changed 6 years ago by simonmar

Fixed, hopefully:

Thu Aug 23 12:16:05 GMT Daylight Time 2007  Simon Marlow <simonmar@microsoft.com>
  * FIX #1280: getPermissions wasn't working on Vista

I'm waiting for a Windows binary dist so I can test on Vista.

Changed 6 years ago by simonmar

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

Fixed.

Changed 6 years ago by igloo

  • milestone changed from 6.8 branch to 6.8.1

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.