Skip to content

Commit

Permalink
Merge pull request #61 from hiratara/windows-compat
Browse files Browse the repository at this point in the history
Improve Windows compatibility
  • Loading branch information
jwiegley committed Jan 11, 2016
2 parents b0c3ad9 + d8432ef commit e26e7a6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gitlib/Git/Tree/Working.hs
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
module Git.Tree.Working where

import Control.Applicative
Expand All @@ -18,7 +19,11 @@ import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Git hiding (Options)
import Prelude hiding (log)
import System.FilePath.Posix
#ifndef mingw32_HOST_OS
import System.Posix.Files
#else
import System.PosixCompat.Files
#endif

data FileEntry m = FileEntry
{ fileModTime :: UTCTime
Expand Down
3 changes: 3 additions & 0 deletions gitlib/gitlib.cabal
Expand Up @@ -63,6 +63,9 @@ Library
if !os(mingw32)
build-depends:
unix >= 2.5.1.1
else
build-depends:
unix-compat >= 0.4
exposed-modules:
Git
Git.Blob
Expand Down
1 change: 1 addition & 0 deletions hlibgit2/Bindings/Libgit2/Windows.hsc
Expand Up @@ -3,6 +3,7 @@
module Bindings.Libgit2.Windows where

#ifdef GIT_WIN32
#strict_import
#ccall gitwin_set_codepage , CUInt -> IO ()
#ccall gitwin_get_codepage , IO (CUInt)
#ccall gitwin_set_utf8 , IO ()
Expand Down
2 changes: 2 additions & 0 deletions hlibgit2/hlibgit2.cabal
Expand Up @@ -229,6 +229,8 @@ Library
libgit2/src/win32/utf-conv.c
include-dirs:
libgit2/src/win32
extra-libraries:
ws2_32, regex, winhttp, crypt32, rpcrt4, ssl, crypto
else
cc-options: -D_GNU_SOURCE -DOPENSSL_SHA1 -Wno-deprecated-declarations
c-sources:
Expand Down

0 comments on commit e26e7a6

Please sign in to comment.