# HG changeset patch # User Alpar Juttner # Date 1234287479 0 # Node ID c5919679af17b5ee951659b5ec6b619a66e9024f # Parent 861a9d5ff283ec024491304718018dc4b7ed4b0b# Parent daddd623ac9a2f41ef9bc6d2b083abb2d06e7a4e Merge diff -r 861a9d5ff283 -r c5919679af17 lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Fri Jan 23 16:42:07 2009 +0000 +++ b/lemon/graph_to_eps.h Tue Feb 10 17:37:59 2009 +0000 @@ -29,8 +29,12 @@ #include #include #else +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif +#ifndef NOMINMAX #define NOMINMAX +#endif #include #endif @@ -688,18 +692,30 @@ os << "%%CreationDate: " << cbuf; #else SYSTEMTIME time; - char buf1[11], buf2[9], buf3[5]; - GetSystemTime(&time); +#if defined(_MSC_VER) && (_MSC_VER < 1500) + LPWSTR buf1, buf2, buf3; if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, - "ddd MMM dd", buf1, 11) && + L"ddd MMM dd", buf1, 11) && GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time, - "HH':'mm':'ss", buf2, 9) && + L"HH':'mm':'ss", buf2, 9) && GetDateFormat(LOCALE_USER_DEFAULT, 0, &time, - "yyyy", buf3, 5)) { + L"yyyy", buf3, 5)) { os << "%%CreationDate: " << buf1 << ' ' << buf2 << ' ' << buf3 << std::endl; } +#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 << "%%CreationDate: " << buf1 << ' ' + << buf2 << ' ' << buf3 << std::endl; + } +#endif #endif } diff -r 861a9d5ff283 -r c5919679af17 lemon/time_measure.h --- a/lemon/time_measure.h Fri Jan 23 16:42:07 2009 +0000 +++ b/lemon/time_measure.h Tue Feb 10 17:37:59 2009 +0000 @@ -24,11 +24,16 @@ ///\brief Tools for measuring cpu usage #ifdef WIN32 +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif +#ifndef NOMINMAX #define NOMINMAX +#endif #include #include #else +#include #include #include #endif