diff --git a/Common/Timer.cpp b/Common/Timer.cpp
index e50932522cd2d8da37fbcb367ccc284f0ac14d36..52b938710a86d3fbcbb9f378bae55cda837ab4b7 100644
--- a/Common/Timer.cpp
+++ b/Common/Timer.cpp
@@ -1,4 +1,4 @@
-// $Id: Timer.cpp,v 1.20 2006-02-25 07:07:29 geuzaine Exp $
+// $Id: Timer.cpp,v 1.21 2006-02-25 07:22:11 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -47,7 +47,8 @@ double GetTimeInSeconds()
 {
   FILETIME ft;
   GetSystemTimeAsFileTime(&ft);
-  double t = 1.e2 * (double)ft.dwHighDateTime;
+  double t = 1.e-1 * (double)ft.dwHighDateTime +
+             1.e-7 * (double)ft.dwLowDateTime;
   return t;
 }
 
diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp
index 3edf38ae7a5468e3c00fd9c8afa163f315b5d7a1..7a5b9cdcce28820dac9227f9f7e4f425f6e3ee78 100644
--- a/Mesh/BDS.cpp
+++ b/Mesh/BDS.cpp
@@ -1,4 +1,4 @@
-// $Id: BDS.cpp,v 1.48 2006-01-07 16:20:50 geuzaine Exp $
+// $Id: BDS.cpp,v 1.49 2006-02-25 07:22:11 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -1291,7 +1291,9 @@ double BDS_Vector::t = 0;
 
 bool BDS_Mesh::read_stl(const char *filename, const double tolerance)
 {
-  FILE *f = fopen(filename, "r");
+  // add 'b' for pure Windows programs, since some of these files
+  // contain binary data
+  FILE *f = fopen(filename, "rb");
   if(!f)
     return false;
   char buffer[256], name[256];
diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp
index 8eff4a45e66e4532654ba8d0f283e5495fec5819..67f3e5cb3db21de598abee6018b53afce84d4634 100644
--- a/Parser/OpenFile.cpp
+++ b/Parser/OpenFile.cpp
@@ -1,4 +1,4 @@
-// $Id: OpenFile.cpp,v 1.90 2006-02-24 22:07:08 geuzaine Exp $
+// $Id: OpenFile.cpp,v 1.91 2006-02-25 07:22:11 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -242,7 +242,9 @@ int MergeProblem(char *name, int warn_if_missing)
   int status;
   FILE *fp;
 
-  if(!(fp = fopen(name, "r"))){
+  // add 'b' for pure Windows programs, since some of these files
+  // contain binary data
+  if(!(fp = fopen(name, "rb"))){
     if(warn_if_missing)
       Msg(WARNING, "Unable to open file '%s'", name);
     return 0;
diff --git a/utils/solvers/c++/interactive.cpp b/utils/solvers/c++/interactive.cpp
index c120a1636151f82de04e54e7c34b2dacbebb1d3e..e8af99ddd416f9a9d626ca728a2dcf13271d852a 100644
--- a/utils/solvers/c++/interactive.cpp
+++ b/utils/solvers/c++/interactive.cpp
@@ -12,7 +12,11 @@ class GmshInteractiveClient{
   {
     using_history();
     char socket[256];
+#if !defined(WIN32) || defined(__CYGWIN__)
     sprintf(socket, "%s/.gmshsock", getenv("HOME"));
+#else
+    sprintf(socket, "127.0.0.1:44122");
+#endif
     if(_client.Connect(socket) < 0) {
       printf("Unable to connect to Gmsh\n");
       exit(1);