Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1529

Tuscany SDO native for windows is not msvc backwards compatible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Cpp-M3
    • None
    • C++ SDO
    • 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

      Attachments

        1. tuscany_patch_jira1529
          0.7 kB
          Brady Johnson

        Activity

          People

            Unassigned Unassigned
            bjohnson@roguewave.com Brady Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: