Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-8

Compilation problems using VC5 or VC6 with later Platform SDKs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.7
    • None
    • None
    • None

    Description

      Thread starting at:
      http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-user@logging.apache.org&msgNo=165

      The major issue is that the prototypes for the InterlockedCompareExchange and similar methods were changed in the Platform SDK sometime after the release of VC6. The existing log4cxx code used #if _MSC_VER == 1200 to select whether to use the old form or the new form. That has two problems, VC5 is shipped with the old SDK but compiles with the new signature since its value of _MSC_VER is not equal to 1200 (it is less). Second, it is possible to use the older compiler with later Platform SDK's that use the new signatures. In that case, the compiler version is not a reliable indication of the form of the prototypes.

      The proposed solution is to add a distinct macro LOG4CXX_OLD_WIN32_INTERLOCKS that would control whether the old or new form are used. Unless set externally, this would be initialized in config_msvc.h based on the _MSC_VER.

      VC5 compilation had a few other issues where internal compiler errors would occur on valid C++ code.

      Attachments

        1. vc5.patch
          9 kB
          Curt Arnold

        Activity

          People

            carnold@apache.org Curt Arnold
            carnold@apache.org Curt Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: