Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Cpp-M3
-
None
-
None
-
MSVC 8.0 and 7.1
-
Patch Available
Description
I've been trying to compile Tuscany on platforms other than VSExpress (which is msvc 8.0) and Linux.
I came across something that doesn't compile on msvc7.1 in SDODate.cpp. The problem is the definition
of localtime for windows. Its #define'd as localtime_s for windows. A simple check for compiler version
would allow it to be defined for msvc 8.0 and anything previous, as follows:
#ifndef tuscany_localtime_r
#if defined(WIN32) || defined (_WINDOWS)
#if _MSC_VER < 1400 // _MSC_VER: 1400 is msvc 8.0, so anything less is pre 8.0
#define tuscany_localtime_r(value, ignore) localtime(&value);
#else
#define tuscany_localtime_r(value, tmp_tm) localtime_s(&tmp_tm, &value);
#endif
#else
#define tuscany_localtime_r(value, tmp_tm) localtime_r(&value, &tmp_tm);
#endif
#endif // tuscany_localtime_r
--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - brady.johnson@roguewave.com