--- bliss.cc
+++ bliss.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <cstdlib>
 #include <cstdio>
 #include <cstring>
@@ -53,13 +58,13 @@
 {
   const char* program_name;
   
-  program_name = rindex(argv0, '/');
+  program_name = strrchr(argv0, '/');
   
   if(program_name) program_name++;
   else program_name = argv0;  
   if(!program_name or *program_name == 0) program_name = "bliss";
 
-  fprintf(fp, "bliss version %s (compiled "__DATE__")\n", bliss::version);
+  fprintf(fp, "bliss version %s (compiled " __DATE__ ")\n", bliss::version);
   fprintf(fp, "Copyright 2003-2015 Tommi Junttila\n");
   fprintf(fp,
 "\n"
--- bliss_C.cc
+++ bliss_C.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <assert.h>
--- defs.cc
+++ defs.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <cstdlib>
 #include <cstdio>
 #include "defs.hh"
--- graph.cc
+++ graph.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <cstdio>
 #include <cassert>
 #include <climits>
--- heap.cc
+++ heap.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <limits.h>
--- orbit.cc
+++ orbit.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <stdlib.h>
 #include <assert.h>
 #include "defs.hh"
--- partition.cc
+++ partition.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <assert.h>
 #include <vector>
 #include <list>
--- timer.cc
+++ timer.cc
@@ -1,5 +1,14 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
+#ifdef WIN32
+#include <windows.h>
+#else
 #include <unistd.h>
 #include <sys/times.h>
+#endif
 #include "timer.hh"
 
 /*
@@ -22,9 +29,9 @@
 */
 
 namespace bliss {
-
+#ifndef WIN32
 static const double numTicksPerSec = (double)(sysconf(_SC_CLK_TCK));
-
+#endif
 Timer::Timer()
 {
   reset();
@@ -32,24 +39,30 @@
 
 void Timer::reset()
 {
+#ifdef WIN32
+  start_time = GetTickCount() / 1000.;
+#else
   struct tms clkticks;
-
   times(&clkticks);
   start_time =
     ((double) clkticks.tms_utime + (double) clkticks.tms_stime) /
     numTicksPerSec;
+#endif
 }
 
 
 double Timer::get_duration()
 {
+#ifdef WIN32
+  return GetTickCount() / 1000. - start_time;
+#else
   struct tms clkticks;
-
   times(&clkticks);
   double intermediate = 
     ((double) clkticks.tms_utime + (double) clkticks.tms_stime) /
     numTicksPerSec;
   return intermediate - start_time;
+#endif
 }
 
 } // namespace bliss
--- uintseqhash.cc
+++ uintseqhash.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include "uintseqhash.hh"
 
 /*
--- utils.cc
+++ utils.cc
@@ -1,3 +1,8 @@
+#ifdef _MSC_VER
+#define and &&
+#define not !
+#define or ||
+#endif
 #include <cassert>
 #include <vector>
 #include "utils.hh"
