1. Log4cxx
  2. LOGCXX-8

Compilation problems using VC5 or VC6 with later Platform SDKs


    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      Thread starting at:

      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.

      1. vc5.patch
        9 kB
        Curt Arnold


        Curt Arnold made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Curt Arnold made changes -
        Attachment vc5.patch [ 14911 ]
        Curt Arnold made changes -
        Field Original Value New Value
        Assignee Michaël CATANZARITI [ mcatan ] Curt Arnold [ carnold@apache.org ]
        Curt Arnold created issue -


          • Assignee:
            Curt Arnold
            Curt Arnold
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: