Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[PATCH] Fix C API on Mac OS X

N/A
2013-09-29
2013-09-30
  • N/A
    N/A
    2013-09-29

    It's quite unclear how to contribute to MediaInfo, so I'll post here.

    MediaInfoDLL.h was recently broken on Linux, and later Mac OS X, while using the C API.

    It is incorrect to include the C++ header <new> for size_t.

    Patch to fix can be found here: http://chromashift.org/tools/linux/mediainfodll_c_fix.patch

    EDIT: This should perhaps be included unconditionally?

    Please review.

     
    Last edit: N/A 2013-09-29
  • It's quite unclear how to contribute to MediaInfo, so I'll post here.

    Patches tracker, but I accept patch here too.
    Don't hesitate to contribute more!

    It is incorrect to include the C++ header for size_t.

    crapy code from me :(

    EDIT: This should perhaps be included unconditionally?

    Not sure: it is ok in most other systems. But I definitely not know what is the best practice.

    Currently, I propose:

        #ifdef __cplusplus
         #include <new> //for size_t
        #else /* __cplusplus */
         #include <stddef.h> //for size_t
        #endif /* __cplusplus */
    

    What do you think of it?