diff options
author | Ted Ross <tross@apache.org> | 2011-05-18 02:14:07 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2011-05-18 02:14:07 +0000 |
commit | eca0963bf440a08ed4ee7abc2ea66cc50fa01f43 (patch) | |
tree | 2a530f3a690e6bafca5819ee90fe2b4427e603a4 /cpp/src/qpid/sys/windows/Time.cpp | |
parent | 111effbd4a988a0fc96d00034f4662ba6c7ebb9f (diff) | |
download | qpid-python-eca0963bf440a08ed4ee7abc2ea66cc50fa01f43.tar.gz |
QPID-2905 - Code modifications to enable Windows builds with the mingw32 compiler.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1104662 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/windows/Time.cpp')
-rw-r--r-- | cpp/src/qpid/sys/windows/Time.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/windows/Time.cpp b/cpp/src/qpid/sys/windows/Time.cpp index fe937bd2de..25c50819cd 100644 --- a/cpp/src/qpid/sys/windows/Time.cpp +++ b/cpp/src/qpid/sys/windows/Time.cpp @@ -102,7 +102,11 @@ void outputFormattedNow(std::ostream& o) { char time_string[100]; ::time( &rawtime ); +#ifdef _MSC_VER ::localtime_s(&timeinfo, &rawtime); +#else + timeinfo = *(::localtime(&rawtime)); +#endif ::strftime(time_string, 100, "%Y-%m-%d %H:%M:%S", &timeinfo); |