0001-ensure-internal-print-operations-are-declared-before.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. [PATCH] ensure internal print operations are declared before use
  2. Stock rapidxml-1.13 does not allow implementers of the
  3. `rapidxml_print.hpp` header to build under GCC 4.7 (or newer) due to
  4. compliation issues. This is a result of "Name lookup changes" introduced
  5. in GCC 4.7 [1]. The following adds forward declarations required to
  6. compile with GCC 4.7+.
  7. This issue has been mentioned upstream [2], but it has yet to be fixed
  8. in official sources.
  9. [1]: https://gcc.gnu.org/gcc-4.7/porting_to.html
  10. [2]: https://sourceforge.net/p/rapidxml/bugs/16/
  11. Signed-off-by: James Knight <james.knight@rockwellcollins.com>
  12. Index: b/rapidxml_print.hpp
  13. ===================================================================
  14. --- a/rapidxml_print.hpp
  15. +++ b/rapidxml_print.hpp
  16. @@ -101,7 +101,16 @@
  17. ///////////////////////////////////////////////////////////////////////////
  18. // Internal printing operations
  19. -
  20. +
  21. + template<class OutIt, class Ch> inline OutIt print_cdata_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  22. + template<class OutIt, class Ch> inline OutIt print_children(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  23. + template<class OutIt, class Ch> inline OutIt print_comment_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  24. + template<class OutIt, class Ch> inline OutIt print_data_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  25. + template<class OutIt, class Ch> inline OutIt print_declaration_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  26. + template<class OutIt, class Ch> inline OutIt print_doctype_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  27. + template<class OutIt, class Ch> inline OutIt print_element_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  28. + template<class OutIt, class Ch> inline OutIt print_pi_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
  29. +
  30. // Print node
  31. template<class OutIt, class Ch>
  32. inline OutIt print_node(OutIt out, const xml_node<Ch> *node, int flags, int indent)