# HG changeset patch
# User "Janos Tapolcai <tapolcai@tmit.bme.hu>"
# Date 1234859983 -3600
# Node ID 28b3dec413f1afefe092ed44c22382351929d4d2
# Parent  879c55700cd4bf2903772de56606fc0aa6e99710
trying some durty hacking for windows

diff --git a/lemon/bits/windows.cc b/lemon/bits/windows.cc
--- a/lemon/bits/windows.cc
+++ b/lemon/bits/windows.cc
@@ -28,12 +28,16 @@
 #ifndef NOMINMAX
 #define NOMINMAX
 #endif
+#define UNICODE
+#define _T(x)      L ## x
+
 #include <windows.h>
 #else
 #include <unistd.h>
 #include <ctime>
 #include <sys/times.h>
 #include <sys/time.h>
+#define _T(x)      x
 #endif
 
 #include <cmath>
@@ -88,26 +92,18 @@
       SYSTEMTIME time;
       GetSystemTime(&time);
 #if defined(_MSC_VER) && (_MSC_VER < 1500)
-      LPWSTR buf1, buf2, buf3;
-      if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        L"ddd MMM dd", buf1, 11) &&
+      wchar_t buf1[11], buf2[9], buf3[5];
+#else      
+      char buf1[11], buf2[9], buf3[5];
+#endif
+	  if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
+                        _T("ddd MMM dd"), buf1, 11) &&
           GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        L"HH':'mm':'ss", buf2, 9) &&
+                        _T("HH':'mm':'ss"), buf2, 9) &&
           GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        L"yyyy", buf3, 5)) {
+                        _T("yyyy"), buf3, 5)) {
         os << buf1 << ' ' << buf2 << ' ' << buf3;
       }
-#else
-      char buf1[11], buf2[9], buf3[5];
-      if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        "ddd MMM dd", buf1, 11) &&
-          GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        "HH':'mm':'ss", buf2, 9) &&
-          GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        "yyyy", buf3, 5)) {
-        os << buf1 << ' ' << buf2 << ' ' << buf3;
-      }
-#endif
       else os << "unknown";
 #else
       timeval tv;
