You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Robin Lee (JIRA)" <ji...@apache.org> on 2013/04/10 08:46:15 UTC

[jira] [Created] (PROTON-287) Fix Qpid Proton-C build with MinGW on Fedora

Robin Lee created PROTON-287:
--------------------------------

             Summary: Fix Qpid Proton-C build with MinGW on Fedora
                 Key: PROTON-287
                 URL: https://issues.apache.org/jira/browse/PROTON-287
             Project: Qpid Proton
          Issue Type: Improvement
          Components: proton-c
    Affects Versions: 0.4
         Environment: mingw32-gcc-4.7.2-7.fc18.x86_64
            Reporter: Robin Lee


This is my first submit on ASF JIRA.

Fix Qpid Proton-C build with MinGW on Fedora. Patches are provided:

Patch 1: http://cheeselee.fedorapeople.org/qpid-proton_trunk_MinGW_STDIO.diff
Description: %z format specifier is not provided by MSVCRT, use MinGW version of *printf to get it. Otherwise build failed with: "proton-c/src/codec/codec.c:1951:3: error: unknown conversion type character 'z' in format [-Werror=format]"

Patch 2: http://cheeselee.fedorapeople.org/qpid-proton_trunk_small_cases.diff
Description: Libraries and header files should be written in small cases, otherwise build failed in cross build environment of Unix-like platforms: "proton-c/src/windows/driver.c:44:22: fatal error: Ws2tcpip.h: No such file or directory"

Patch 3: http://cheeselee.fedorapeople.org/qpid-proton_trunk_pn_connector_t.diff
Description: Change pn_connector_t::fd to type of pn_socket_t. Otherwise, since on Windows platform, pn_socket_t (typedef of SOCKET) is unsigned, build failed with: "proton-c/src/windows/driver.c:785:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]"

Patch 4: http://cheeselee.fedorapeople.org/qpid-proton_trunk_unimplemented_functions.diff
Description: Commented unimplemented functions. Otherwise build failed with "proton-c/src/windows/driver.c:416:13: error: 'pn_connector_write' declared 'static' but never defined [-Werror=unused-function]"

Patch 5: http://cheeselee.fedorapeople.org/qpid-proton_trunk_wincompat-getopt.diff
Description:
1. ID is not used, build failed with "../wincompat/internal/getopt.c:43:20: error: 'ID' defined but not used [-Werror=unused-variable]"
2. Corrected getopt signiture, otherwise build failed with "proton-c/src/../wincompat/internal/getopt.c:97:5: note: expected 'char *' but argument is of type 'const char *'"
3. wincompat/getopt.h #include wincompat/internal/getopt.c directly, so #include wincompat/getopt.h in .c files instead of .h, otherwise build failed with multiple definitions.

Patch 6: http://cheeselee.fedorapeople.org/qpid-proton_trunk_WIN32_macro.diff
Description: WIN32 macro is not defined with -std=c99 but defined with -std=gnu99. Use _WIN32 macro in all places.


Built on Fedora and examples of recv and send are tested on Windows 7.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira