darcs

Patch 235 Fix compilation on GHC 6.12 on win32 (needs unix-compat).

Title Fix compilation on GHC 6.12 on win32 (needs unix-compat).
Superseder Nosy List darcs-users, kowey, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-05-06.14:25:21 by mornfall, last changed 2011-05-10.21:05:49 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
fix-compilation-on-ghc-6_12-on-win32-_needs-unix_compat__.dpatch mornfall, 2010-05-06.14:25:21 text/x-darcs-patch
unnamed mornfall, 2010-05-06.14:25:21
See mailing list archives for discussion on individual patches.
Messages
msg10984 (view) Author: mornfall Date: 2010-05-06.14:25:21
Fixes windows builds on latest Haskell Platform. Should be hopefully applied to
2.4 branch as well. (To successfully build, you will also need hashed-storage
0.4.13, to be released.)

Yours,
   Petr.

1 patch for repository darcs-unstable@darcs.net:darcs:

Thu May  6 16:03:38 CEST 2010  Petr Rockai <me@mornfall.net>
  * Fix compilation on GHC 6.12 on win32 (needs unix-compat).
Attachments
msg10988 (view) Author: kowey Date: 2010-05-06.15:14:53
On Thu, May 06, 2010 at 14:25:21 +0000, Petr Ročkai wrote:
> Fixes windows builds on latest Haskell Platform. Should be hopefully applied to
> 2.4 branch as well. (To successfully build, you will also need hashed-storage
> 0.4.13, to be released.)

I talked briefly with Petr on IRC about this.

Aside from accounting for the GHC 6.12 internal representation for file
paths, this replaces our System.Posix.Files compatibility code (for
Windows) with a 3rd party package unix-compat (by Bjorn Bringert).

We agreed that whatever the risks of this action are, the alternative
(doing it ourselves) is worse.  So press on...

No comments, just reading below.

Fix compilation on GHC 6.12 on win32 (needs unix-compat).
---------------------------------------------------------
> +module System.Posix.Files( isNamedPipe, isDirectory, isRegularFile, isSymbolicLink
> +                               , getFdStatus, getFileStatus, getSymbolicLinkStatus
> +                               , modificationTime, setFileMode, fileSize, fileMode
> +                               , stdFileMode, linkCount, createLink ) where

We nuke these and re-export them from System.PosixCompat.Files.

>  openFd :: FilePath -> OpenMode -> Maybe FileMode -> OpenFileFlags -> IO Fd
>  openFd name how maybe_mode off = do
> +#if mingw32_HOST_OS && __GLASGOW_HASKELL__ >= 612
> +  withCWString name $ \s -> do
> +#else
>    withCString name $ \s -> do
> hunk ./src/win32/System/Posix/IO.hsc 45
> +#endif
>     fd <- throwErrnoIfMinus1 "openFd" (c_open s all_flags mode_w)
>     return (Fd fd)
>   where

These are motivated by the recent GHC 6.12 changes pointed out by Brian
Smith on Reddit and discussed with Simon Marlow.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg10990 (view) Author: darcswatch Date: 2010-05-06.15:46:02
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-ad97b1339116646270df36f35ba5717ead6a65f9
msg14301 (view) Author: darcswatch Date: 2011-05-10.21:05:49
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-ad97b1339116646270df36f35ba5717ead6a65f9
History
Date User Action Args
2010-05-06 14:25:21mornfallcreate
2010-05-06 14:27:55darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-ad97b1339116646270df36f35ba5717ead6a65f9
2010-05-06 15:14:54koweysetnosy: + kowey
messages: + msg10988
2010-05-06 15:46:02darcswatchsetstatus: needs-review -> accepted
messages: + msg10990
2011-05-10 21:05:49darcswatchsetmessages: + msg14301