--
 -----------------------------------------------------------------------------
 
+#include "config.h"
+
 module System.Posix.Types (
   CDev(..), CIno(..), CMode(..), COff(..), CPid(..), CSsize(..),
 
 
   Fd(..),
 
+#ifndef mingw32_TARGET_OS
+  LinkCount,
+  UserID,
+  GroupID,
+#endif
+
   ByteCount,
   ClockTick,
   EpochTime,
   FileOffset,
-  GroupID,
-  LinkCount,
   ProcessID,
   ProcessGroupID,
-  UserID,
   DeviceID,
   FileID,
   FileMode
 
 #include "Dynamic.h"
 #include "CTypes.h"
-#include "config.h"
 
 NUMERIC_TYPE(CDev,tyConCDev,"CDev",HTYPE_DEV_T)
 INTEGRAL_TYPE(CIno,tyConCIno,"CIno",HTYPE_INO_T)
 INTEGRAL_TYPE(Fd,tyConFd,"Fd",CInt)
 
 -- nicer names, and backwards compatibility with POSIX library:
+#ifndef mingw32_TARGET_OS
+type LinkCount      = CNlink
+type UserID         = CUid
+type GroupID        = CGid
+#endif
+
 type ByteCount      = CSize
 type ClockTick      = CClock
 type EpochTime      = CTime
-type LinkCount      = CNlink
 type DeviceID       = CDev
 type FileID         = CIno
 type FileMode       = CMode
 type ProcessID      = CPid
-type UserID         = CUid
-type GroupID        = CGid
 type FileOffset     = COff
 type ProcessGroupID = CPid