Skip to content

Commit

Permalink
Patch implicit bool conversion in xmlmm
Browse files Browse the repository at this point in the history
  • Loading branch information
mlt committed Apr 27, 2015
1 parent d36dbf6 commit 1e80b3b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ GET(${GTKMM_DIR_URL}/${GTKMM_DIR}.tar.xz)
GET(${PANGOMM_DIR_URL}/${PANGOMM_DIR}.tar.xz)
GET(${SIGC_DIR_URL}/${SIGC_DIR}.tar.xz)
GET(${XMLMM_DIR_URL}/${XMLMM_DIR}.tar.xz)
execute_process(COMMAND ${PATCH} -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/patches/libxmlpp_stream_explicit_bool.patch
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${XMLMM_DIR})
GET(${GSTREAMERMM_DIR_URL}/${GSTREAMERMM_DIR}.tar.xz)
GET_VERSION(${GSTREAMERMM_DIR} GSTREAMERMM_MAJOR_VERSION GSTREAMERMM_MINOR_VERSION GSTREAMERMM_MICRO_VERSION)
execute_process(COMMAND ${PATCH} -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/patches/gstreamer_mp_player_window_cc.patch
Expand Down
30 changes: 30 additions & 0 deletions patches/libxmlpp_stream_explicit_bool.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff -burN libxml++.orig/io/istreamparserinputbuffer.cc libxml++/io/istreamparserinputbuffer.cc
--- libxml++.orig/io/istreamparserinputbuffer.cc 2013-09-29 04:45:16.000000000 -0500
+++ libxml++/io/istreamparserinputbuffer.cc 2015-04-25 23:21:46.392578500 -0500
@@ -39,6 +39,6 @@

bool IStreamParserInputBuffer::do_close()
{
- return input_;
+ return !input_.fail();
}
}
diff -burN libxml++.orig/io/ostreamoutputbuffer.cc libxml++/io/ostreamoutputbuffer.cc
--- libxml++.orig/io/ostreamoutputbuffer.cc 2013-09-29 04:45:16.000000000 -0500
+++ libxml++/io/ostreamoutputbuffer.cc 2015-04-25 23:24:57.258269000 -0500
@@ -29,13 +29,13 @@
// here we rely on the ostream implicit conversion to boolean, to know if the stream can be used and/or if the write succeded.
if(output_)
output_.write(buffer, len);
- return output_;
+ return !output_.fail();
}

bool OStreamOutputBuffer::do_close()
{
if(output_)
output_.flush();
- return output_;
+ return !output_.fail();
}
}

0 comments on commit 1e80b3b

Please sign in to comment.