Skip to content

Commit 95ae630

Browse files
author
RyanGlScott
committed
Fix Windows build, version bump
1 parent 906cdcf commit 95ae630

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

CHANGES.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Changes in 0.8.1.1
2+
- Fixed Windows build
3+
14
## Changes in 0.8.1
25
- Implement `setEnv` and `unsetEnv` in `System.Environment.Compat` (which were
36
ported from the `setenv` package). As a result, `base-compat` now depends

base-compat.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: base-compat
2-
version: 0.8.1
2+
version: 0.8.1.1
33
license: MIT
44
license-file: LICENSE
55
copyright: (c) 2012-2015 Simon Hengel,

src/System/Environment/Compat.hs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module System.Environment.Compat (
1616
import System.Environment
1717

1818
#if !(MIN_VERSION_base(4,7,0))
19-
import Prelude.Compat
19+
import Prelude.Compat
2020

2121
# ifdef mingw32_HOST_OS
2222
import Control.Monad
@@ -26,35 +26,34 @@ import GHC.Windows
2626
# else
2727
import qualified System.Posix.Env as Posix
2828
# endif
29-
#endif
3029

31-
#ifdef mingw32_HOST_OS
32-
# if defined(i386_HOST_ARCH)
33-
# define WINDOWS_CCONV stdcall
34-
# elif defined(x86_64_HOST_ARCH)
35-
# define WINDOWS_CCONV ccall
36-
# else
37-
# error Unknown mingw32 arch
38-
# endif
30+
# ifdef mingw32_HOST_OS
31+
32+
# if defined(i386_HOST_ARCH)
33+
# define WINDOWS_CCONV stdcall
34+
# elif defined(x86_64_HOST_ARCH)
35+
# define WINDOWS_CCONV ccall
36+
# else
37+
# error Unknown mingw32 arch
38+
# endif
3939

4040
foreign import WINDOWS_CCONV unsafe "windows.h GetLastError"
4141
c_GetLastError:: IO DWORD
4242

4343
eRROR_ENVVAR_NOT_FOUND :: DWORD
4444
eRROR_ENVVAR_NOT_FOUND = 203
4545

46-
#endif
46+
# endif
4747

48-
#if !(MIN_VERSION_base(4,6,0))
48+
# if !(MIN_VERSION_base(4,6,0))
4949
-- | Return the value of the environment variable @var@, or @Nothing@ if
5050
-- there is no such value.
5151
--
5252
-- For POSIX users, this is equivalent to 'System.Posix.Env.getEnv'.
5353
lookupEnv :: String -> IO (Maybe String)
5454
lookupEnv k = lookup k `fmap` getEnvironment
55-
#endif
55+
# endif
5656

57-
#if !(MIN_VERSION_base(4,7,0))
5857
-- | @setEnv name value@ sets the specified environment variable to @value@.
5958
--
6059
-- On Windows setting an environment variable to the /empty string/ removes

0 commit comments

Comments
 (0)