From cd2af9e5f5f973759ade0595a32694f9e0230647 Mon Sep 17 00:00:00 2001 From: Ben Woodard via Libabigail Date: Tue, 2 Mar 2021 14:11:12 -0800 Subject: [PATCH] Fix declaratons of conditionally defined functions Functions relating to zip archives are declared but are never compiled when --enable-zip-archive=no, the default. This makes sure that they are not declared when they won't be defined due to conditional compilation. Signed-off-by: Ben Woodard --- include/abg-reader.h | 4 +++- tools/abilint.cc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/abg-reader.h b/include/abg-reader.h index 70851c86..f1408912 100644 --- a/include/abg-reader.h +++ b/include/abg-reader.h @@ -52,7 +52,8 @@ create_native_xml_read_context(std::istream* in, environment* env); const string& read_context_get_path(const read_context&); -abigail::corpus_sptr +#ifdef WITH_ZIP_ARCHIVE +corpus_sptr read_corpus_from_file(const string& path); int @@ -61,6 +62,7 @@ read_corpus_from_file(corpus_sptr& corp, int read_corpus_from_file(corpus_sptr& corp); +#endif //WITH_ZIP_ARCHIVE corpus_sptr read_corpus_from_native_xml(std::istream* in, diff --git a/tools/abilint.cc b/tools/abilint.cc index aaf500f7..fb7b0781 100644 --- a/tools/abilint.cc +++ b/tools/abilint.cc @@ -48,7 +48,6 @@ using abigail::corpus; using abigail::corpus_sptr; using abigail::xml_reader::read_translation_unit_from_file; using abigail::xml_reader::read_translation_unit_from_istream; -using abigail::xml_reader::read_corpus_from_file; using abigail::xml_reader::read_corpus_from_native_xml; using abigail::xml_reader::read_corpus_from_native_xml_file; using abigail::xml_reader::read_corpus_group_from_input; @@ -58,6 +57,9 @@ using abigail::xml_writer::write_context_sptr; using abigail::xml_writer::create_write_context; using abigail::xml_writer::write_corpus; using abigail::xml_writer::write_corpus_to_archive; +#ifdef WITH_ZIP_ARCHIVE +using abigail::xml_reader::read_corpus_from_file; +#endif struct options {