Repository: qpid-proton Updated Branches: refs/heads/master 4b955e4bd -> 350ec8203
PROTON-820: Fix perl binding to compile generated code with CXX for CXX builds. Notes to windows users: 1. This fix causes breakage in the perl binding install. See https://issues.apache.org/jira/browse/PROTON-821 2. Build tested with perl 5.10. Current Strawberry perl 5.20.1.1 fails perl\lib\core\handy.h(77) can't open stdbool.h Stdbool.h is a Proton pitfall of which perl is unaware. Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/350ec820 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/350ec820 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/350ec820 Branch: refs/heads/master Commit: 350ec8203f635631f27465880d8a6f768266a1ad Parents: 4b955e4 Author: Chuck Rolke <c...@redhat.com> Authored: Wed Feb 18 11:14:09 2015 -0500 Committer: Chuck Rolke <c...@redhat.com> Committed: Wed Feb 18 11:14:09 2015 -0500 ---------------------------------------------------------------------- proton-c/bindings/perl/CMakeLists.txt | 4 ++++ proton-c/bindings/perl/perl.i | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/350ec820/proton-c/bindings/perl/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/bindings/perl/CMakeLists.txt b/proton-c/bindings/perl/CMakeLists.txt index 2a25327..aedd6f1 100644 --- a/proton-c/bindings/perl/CMakeLists.txt +++ b/proton-c/bindings/perl/CMakeLists.txt @@ -19,6 +19,10 @@ include_directories("${PERL_INCLUDE_PATH}") +if (BUILD_WITH_CXX) + SET_SOURCE_FILES_PROPERTIES(cproton.i perl.i PROPERTIES CPLUSPLUS ON) +endif(BUILD_WITH_CXX) + # Need to pass in the same compiler flags used to build Perl itself execute_process(COMMAND perl -MConfig -e "print \$Config{ccflags}" OUTPUT_VARIABLE PERLCFLAGS) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/350ec820/proton-c/bindings/perl/perl.i ---------------------------------------------------------------------- diff --git a/proton-c/bindings/perl/perl.i b/proton-c/bindings/perl/perl.i index e5c093c..d4bffbf 100644 --- a/proton-c/bindings/perl/perl.i +++ b/proton-c/bindings/perl/perl.i @@ -203,7 +203,7 @@ ssize_t pn_transport_input(pn_transport_t *transport, char *STRING, size_t LENGT %inline %{ void wrap_pn_delivery_tag(pn_delivery_t *delivery, char **ALLOC_OUTPUT, size_t *ALLOC_SIZE) { pn_delivery_tag_t tag = pn_delivery_tag(delivery); - *ALLOC_OUTPUT = malloc(tag.size); + *ALLOC_OUTPUT = (char *)malloc(tag.size); *ALLOC_SIZE = tag.size; memcpy(*ALLOC_OUTPUT, tag.start, tag.size); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org