diff --git a/System/PosixCompat/Extensions.hsc b/System/PosixCompat/Extensions.hsc
--- a/System/PosixCompat/Extensions.hsc
+++ b/System/PosixCompat/Extensions.hsc
@@ -5,10 +5,13 @@
          deviceMajor, deviceMinor, makeDeviceID
    ) where
 
+
+#if UNIX_IMPL
 #include "HsUnixCompat.h"
+#endif
 
 import Foreign.C.Types
-import System.Posix.Types
+import System.PosixCompat.Types
 
 
 type CMajor = CUInt
diff --git a/System/PosixCompat/Files.hsc b/System/PosixCompat/Files.hsc
--- a/System/PosixCompat/Files.hsc
+++ b/System/PosixCompat/Files.hsc
@@ -59,14 +59,14 @@
     PathVar(..), getPathVar, getFdPathVar,
  ) where
 
-#include "HsUnixCompat.h"
-
 #if UNIX_IMPL
 
+#include "HsUnixCompat.h"
+
 import System.Posix.Files
 
 #if NEED_setSymbolicLinkOwnerAndGroup
-import System.Posix.Types
+import System.PosixCompat.Types
 #endif
 
 #else /* Portable implementation */
@@ -79,7 +79,7 @@
                          getModificationTime)
 import System.IO (IOMode(..), openFile, hFileSize, hSetFileSize, hClose)
 import System.IO.Error
-import System.Posix.Types
+import System.PosixCompat.Types
 import System.Time (ClockTime(..), getClockTime)
 
 #if __GLASGOW_HASKELL__
diff --git a/System/PosixCompat/Types.hs b/System/PosixCompat/Types.hs
new file mode 100644
--- /dev/null
+++ b/System/PosixCompat/Types.hs
@@ -0,0 +1,32 @@
+module System.PosixCompat.Types (
+  module System.Posix.Types,
+#ifndef UNIX_IMPL
+  UserID, GroupID, LinkCount
+#endif
+  ) where
+
+import System.Posix.Types
+
+#ifndef UNIX_IMPL
+
+import Data.Word (Word32)
+
+newtype UserID = UserID Word32
+  deriving (Eq, Ord, Enum, Bounded, Integral, Num, Real)
+instance Show UserID where show (UserID x) = show x
+instance Read UserID where readsPrec i s = [ (UserID x, s')
+                                           | (x,s') <- readsPrec i s]
+
+newtype GroupID = GroupID Word32
+  deriving (Eq, Ord, Enum, Bounded, Integral, Num, Real)
+instance Show GroupID where show (GroupID x) = show x
+instance Read GroupID where readsPrec i s = [ (GroupID x, s')
+                                            | (x,s') <- readsPrec i s]
+
+newtype LinkCount = LinkCount Word32
+  deriving (Eq, Ord, Enum, Bounded, Integral, Num, Real)
+instance Show LinkCount where show (LinkCount x) = show x
+instance Read LinkCount where readsPrec i s = [ (LinkCount x, s')
+                                              | (x,s') <- readsPrec i s]
+
+#endif
diff --git a/System/PosixCompat/User.hsc b/System/PosixCompat/User.hsc
--- a/System/PosixCompat/User.hsc
+++ b/System/PosixCompat/User.hsc
@@ -26,16 +26,16 @@
     setGroupID
   ) where
 
-#include "HsUnixCompat.h"
-
 #if UNIX_IMPL
 
+#include "HsUnixCompat.h"
+
 import System.Posix.User
 
 #else /* Portable implementation */
 
 import System.IO.Error
-import System.Posix.Types
+import System.PosixCompat.Types
 
 #endif
 
diff --git a/include/HsUnixCompat.h b/include/HsUnixCompat.h
--- a/include/HsUnixCompat.h
+++ b/include/HsUnixCompat.h
@@ -1,6 +1,3 @@
-#define UNIX_IMPL !defined(mingw32_HOST_OS)
-
-#if UNIX_IMPL
 #include "HsUnix.h"
 #include <sys/types.h>
 
@@ -9,6 +6,3 @@
 dev_t unix_makedev(unsigned int maj, unsigned int min);
 
 #define NEED_setSymbolicLinkOwnerAndGroup !HAVE_LCHOWN
-
-#endif
-
diff --git a/unix-compat.cabal b/unix-compat.cabal
--- a/unix-compat.cabal
+++ b/unix-compat.cabal
@@ -1,6 +1,6 @@
 Name: unix-compat
-Version: 0.1.1
-Cabal-version: >= 1.2
+Version: 0.1.2.0
+Cabal-version: >= 1.2.1
 Build-type: Simple
 License: BSD4
 License-file: LICENSE
@@ -11,20 +11,30 @@
   of the unix package. This package re-exports the unix 
   package when available. When it isn't available,
   portable implementations are used.
-Extra-source-files: include/HsUnixCompat.h
 
+Flag split-base
+
 Library
   Exposed-modules:
     System.PosixCompat.Extensions
     System.PosixCompat.Files
     System.PosixCompat.User
-  Extensions: CPP, ForeignFunctionInterface
-  Include-dirs: include
-  Includes: HsUnixCompat.h
-  Install-includes: HsUnixCompat.h
-  C-sources: cbits/HsUnixCompat.c
+    System.PosixCompat.Types
+  Extensions: CPP
   GHC-Options: -Wall
   Build-depends: base
 
-  if !os(mingw32)
+  if os(windows)
+    if flag(split-base)
+      Build-depends: base >= 3, old-time, directory
+    else
+      Build-depends: base < 3
+    Extensions: GeneralizedNewtypeDeriving
+  else
     Build-depends: unix
+    Extensions: ForeignFunctionInterface
+    CPP-options: -DUNIX_IMPL
+    Include-dirs: include
+    Includes: HsUnixCompat.h
+    Install-includes: HsUnixCompat.h
+    C-sources: cbits/HsUnixCompat.c
