# HG changeset patch
# User Janos Tapolcai <tapolcai@tmit.bme.hu>
# Date 1234890607 -3600
# Node ID 0316fe05c4ecc341f4b00380111a5bd5acf418f6
# Parent  879c55700cd4bf2903772de56606fc0aa6e99710
Further fixes to windows.cc (#215)

diff --git a/lemon/bits/windows.cc b/lemon/bits/windows.cc
--- a/lemon/bits/windows.cc
+++ b/lemon/bits/windows.cc
@@ -28,6 +28,9 @@
 #ifndef NOMINMAX
 #define NOMINMAX
 #endif
+#ifdef UNICODE
+#undef UNICODE
+#endif
 #include <windows.h>
 #else
 #include <unistd.h>
@@ -87,27 +90,15 @@
 #ifdef WIN32
       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) &&
+      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,
-                        L"HH':'mm':'ss", buf2, 9) &&
+                        ("HH':'mm':'ss"), buf2, 9) &&
           GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
-                        L"yyyy", buf3, 5)) {
+                        ("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;
