* [PATCH] Fix declaratons of conditionally defined functions
@ 2021-03-02 22:11 Ben Woodard
2021-03-08 12:34 ` Dodji Seketeli
0 siblings, 1 reply; 2+ messages in thread
From: Ben Woodard @ 2021-03-02 22:11 UTC (permalink / raw)
To: libabigail
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 <woodard@redhat.com>
---
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
{
--
2.30.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix declaratons of conditionally defined functions
2021-03-02 22:11 [PATCH] Fix declaratons of conditionally defined functions Ben Woodard
@ 2021-03-08 12:34 ` Dodji Seketeli
0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2021-03-08 12:34 UTC (permalink / raw)
To: Ben Woodard via Libabigail
Hello Ben,
Ben Woodard via Libabigail <libabigail@sourceware.org> a écrit:
> 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 <woodard@redhat.com>
I have amended the commit log to add the ChangeLog part as explained in
the document
https://sourceware.org/git/?p=libabigail.git;a=blob;f=COMMIT-LOG-GUIDELINES.
So here is what the adjusted commit log looks like:
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.
* include/abg-reader.h (read_corpus_from_file): Guard the
declaration of these overloads with #ifdef WITH_ZIP_ARCHIVE.
* tools/abilint.cc: Guard the use of
abigail::xml_reader::read_corpus_from_file with #ifdef
WITH_ZIP_ARCHIVE.
Other than that, the patch looks good to me and I have applied to
master.
Thanks!
[...]
Cheers,
--
Dodji
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-08 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 22:11 [PATCH] Fix declaratons of conditionally defined functions Ben Woodard
2021-03-08 12:34 ` Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).