Celix
  1. Celix
  2. CELIX-6

Make utils and related tests compliant for windows

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows, Visual studio 2008

      Description

      A first patch to make celix available on Windows. The problem is that the ms compiler is not C99 compliant.

      The problems solved so far are:

      • move all declaration to the beginning of a function
      • introduce celixbool.h because stdbool.h is not available

      This patch only concerns utils and is used to verify if nothing is broken.

      1. hash_map_hash_test.patch
        6 kB
        Erik Sanders
      2. hash_tested.patch
        22 kB
        Erik Sanders
      3. cunit.patch
        21 kB
        Erik Sanders
      4. utilspatch.patch
        18 kB
        Erik Sanders

        Activity

        Hide
        Erik Sanders added a comment -

        Changes so far. Be careful because some changes like exclude m.lib is a windows only solution. Testing and doxygen are also skipped

        Show
        Erik Sanders added a comment - Changes so far. Be careful because some changes like exclude m.lib is a windows only solution. Testing and doxygen are also skipped
        Hide
        Alexander Broekhuis added a comment -

        Hi, thx for the patch, great to see some progress on windows for this. Had to change some small things, but it should work on windows and linux now. Committed to revision 1136423.

        Show
        Alexander Broekhuis added a comment - Hi, thx for the patch, great to see some progress on windows for this. Had to change some small things, but it should work on windows and linux now. Committed to revision 1136423.
        Hide
        Erik Sanders added a comment -

        Made utils testable with cunit.

        I used http://code.google.com/p/c-unit/ version 1.1.1 and the vs2008 using \c-unit-1.1.1\vc8\cunit.sln

        Also changes to the cmake file (cmake/modules/FindCUnit.cmake
        ) to exclude curses and to add the correct path

        see the patch

        Show
        Erik Sanders added a comment - Made utils testable with cunit. I used http://code.google.com/p/c-unit/ version 1.1.1 and the vs2008 using \c-unit-1.1.1\vc8\cunit.sln Also changes to the cmake file (cmake/modules/FindCUnit.cmake ) to exclude curses and to add the correct path see the patch
        Hide
        Erik Sanders added a comment -

        Hash_test is now working on windows. Fixed an initialization issue on the resize and fixed the test to use compare/hash functions to work on char*

        Fixed the standard problems for windows as well

        • stdbool
        • declaration
        • dllimport

        this patch includes the previous patch on cunit

        Show
        Erik Sanders added a comment - Hash_test is now working on windows. Fixed an initialization issue on the resize and fixed the test to use compare/hash functions to work on char* Fixed the standard problems for windows as well stdbool declaration dllimport this patch includes the previous patch on cunit
        Hide
        Alexander Broekhuis added a comment -

        Hi, I have committed the patch to revision 1137628. I've undone the compare/hash function change on the test. The hash_map_test is used to test the default hash fallback function. It should have failed on linux, and the test itself was wrong. This is also fixed in this revision.

        Again, thanks, looking forward to more!

        Show
        Alexander Broekhuis added a comment - Hi, I have committed the patch to revision 1137628. I've undone the compare/hash function change on the test. The hash_map_test is used to test the default hash fallback function. It should have failed on linux, and the test itself was wrong. This is also fixed in this revision. Again, thanks, looking forward to more!
        Hide
        Erik Sanders added a comment -

        All utils test now compile and succeed on windows

        Show
        Erik Sanders added a comment - All utils test now compile and succeed on windows
        Hide
        Alexander Broekhuis added a comment -

        Applied, tested and committed to revision 1138010.

        To keeps things a little traceable I will close this issue, since now utils and the tests for utils are working. Please create new issues for the other components.

        Again, thanks!

        Show
        Alexander Broekhuis added a comment - Applied, tested and committed to revision 1138010. To keeps things a little traceable I will close this issue, since now utils and the tests for utils are working. Please create new issues for the other components. Again, thanks!

          People

          • Assignee:
            Unassigned
            Reporter:
            Erik Sanders
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development