diff --git a/sigma-ij.cabal b/sigma-ij.cabal
--- a/sigma-ij.cabal
+++ b/sigma-ij.cabal
@@ -1,6 +1,6 @@
 
 Name:                sigma-ij
-Version:             0.2.0.1
+Version:             0.2.0.2
 Synopsis:            Thom polynomials of second order Thom-Boardman singularities
 Description:         A program to compute Thom polynomials of second order Thom-Boardman 
                      singularities, using the localization method described in the
@@ -63,6 +63,15 @@
   Build-Depends:       base >= 4 && < 5, array >= 0.5, containers >= 0.5, random,
                        time, parsec2, optparse-applicative, 
                        combinat >= 0.2.8
+
+  if os(linux)
+    cc-options:          -DLINUX_HOST_OS
+
+  if os(darwin)
+    cc-options:          -DDARWIN_HOST_OS
+
+  if os(mingw32)           
+    cc-options:          -DMINGW32_HOST_OS
 
   Default-Extensions:  CPP, BangPatterns, ScopedTypeVariables
   Other-Extensions:    TypeFamilies, ForeignFunctionInterface
diff --git a/src/cbits/c_det.c b/src/cbits/c_det.c
--- a/src/cbits/c_det.c
+++ b/src/cbits/c_det.c
@@ -1,7 +1,15 @@
 
 #include "c_det.h"
 
-typedef __int128  int128_t;
+#if defined(DARWIN_HOST_OS)
+
+typedef __int128_t int128_t;
+
+#else
+
+typedef __int128   int128_t;
+
+#endif
 
 // -----------------------------------------------------------------------------
 
