# HG changeset patch
# User Janos Tapolcai <tapolcai@tmit.bme.hu>
# Date 1234890607 -3600
# Node ID 4b03fc4ad52161fd92c3e61b4ed8a5e9297813f0
# Parent 879c55700cd4bf2903772de56606fc0aa6e99710
Further fixes to windows.cc
diff --git a/lemon/bits/windows.cc b/lemon/bits/windows.cc
a
|
b
|
|
27 | 27 | #endif |
28 | 28 | #ifndef NOMINMAX |
29 | 29 | #define NOMINMAX |
| 30 | #endif |
| 31 | #ifndef UNICODE |
| 32 | #define UNICODE |
| 33 | #endif |
| 34 | #if !defined(_T) |
| 35 | #define _T(x) L ## x |
30 | 36 | #endif |
31 | 37 | #include <windows.h> |
32 | 38 | #else |
… |
… |
|
87 | 93 | #ifdef WIN32 |
88 | 94 | SYSTEMTIME time; |
89 | 95 | GetSystemTime(&time); |
90 | | #if defined(_MSC_VER) && (_MSC_VER < 1500) |
91 | | LPWSTR buf1, buf2, buf3; |
92 | | if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, |
93 | | L"ddd MMM dd", buf1, 11) && |
| 96 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) |
| 97 | char buf1[11], buf2[9], buf3[5]; |
| 98 | #else |
| 99 | wchar_t buf1[11], buf2[9], buf3[5]; |
| 100 | #endif |
| 101 | if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, |
| 102 | _T("ddd MMM dd"), buf1, 11) && |
94 | 103 | GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time, |
95 | | L"HH':'mm':'ss", buf2, 9) && |
| 104 | _T("HH':'mm':'ss"), buf2, 9) && |
96 | 105 | GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, |
97 | | L"yyyy", buf3, 5)) { |
| 106 | _T("yyyy"), buf3, 5)) { |
98 | 107 | os << buf1 << ' ' << buf2 << ' ' << buf3; |
99 | 108 | } |
100 | | #else |
101 | | char buf1[11], buf2[9], buf3[5]; |
102 | | if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, |
103 | | "ddd MMM dd", buf1, 11) && |
104 | | GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time, |
105 | | "HH':'mm':'ss", buf2, 9) && |
106 | | GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, |
107 | | "yyyy", buf3, 5)) { |
108 | | os << buf1 << ' ' << buf2 << ' ' << buf3; |
109 | | } |
110 | | #endif |
111 | 109 | else os << "unknown"; |
112 | 110 | #else |
113 | 111 | timeval tv; |