The utilities present in this namespace were previously living in
tools/abg-tools-utils.h and tools/abg-tools-utils.cc. They were not
exported and were meant to be useful to the tools writting in the
tools/ directory. I realized that these utilities might be useful to
clients of the libabigail library in general so I am making them
available generally. Note that the initial name of the namespace was
libabigail::tools; so renaming it to libabigail::tools_utils required
that I adjust some client code. I have also cleaned up the code,
interfaces and their apidoc a little bit.
* include/abg-tools-utils.h: Moved tools/abg-tools-utils.h in
here. Renamed the namespace tools into tools_utils. Inject
std::ostream, std::istream, std::ifstream, and std::string types
into the tools_utils namespace. Adjust the function declarations
accordingly. Remove the useless dirname() function declaration.
* include/Makefile.am: Add abg-tools-utils.h to the list of
exported headers.
* src/abg-tools-utils.cc: Moved tools/abg-tools-utils.cc in here.
Renamed the namespace tools into tools_utils.
(get_stat): Add apidoc.
(is_dir): Cleanup apidoc.
(dir_name); Cleanup parameter name.
(guess_file_type): Cleanup parameter type.
* src/Makefile.am: Add abg-tools-utils.cc to the list of exported
headers.
* tools/Makefile.am: Do not build the temporary library
libtoolsutils.la anymore as abg-tools-utils.{h,cc} have moved out
of this directory.
* tools/abicompat.cc (parse_command_line, main): Adjust for tools
-> tools_utils namespace change.
* tools/abidiff.cc (parse_command_line, main): Likewise.
* tools/abidw.cc (parse_command_line, main): Likewise.
* tools/abilint.cc (parse_command_line, main): Likewise.
* tests/test-abicompat.cc (main): Adjust for tools -> tools_utils
namespace change.
* tests/test-abidiff.cc (main): Likewise.
* tests/test-alt-dwarf-file.cc (main): Likewise.
* tests/test-core-diff.cc (main): Likewise.
* tests/test-diff-dwarf.cc (main): Likewise.
* tests/test-diff-filter.cc (main): Likewise.
* tests/test-diff-suppr.cc (main): Likewise.
* tests/test-lookup-syms.cc (main): Likewise.
* tests/test-read-dwarf.cc (main): Likewise.
* tests/test-read-write.cc (main): Likewise.
* tests/Makefile.am: Do not reference the libtoolsutils.la private
library anymore.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* configure.ac: Define a new --enable-cxx11 switch to control the
use of the C++-11 compiler. Define a WITH_CXX11 C macro and an
automake ENABLE_CXX11 variable.
* config.h.in: Initialize the new WITH_CXX11 C macro.
* src/Makefile.am: Include the files coded in C++-11 only if the
ENABLE_CXX11 automake variable is defined.
* tests/Makefile.am: Likewise, build the runtestsvg test program
only if C++-11 usage is enabled.
* include/abg-diff-utils.h (class d_path_vec): Remove useless
usage of the 'typename' keyword.
* include/abg-fwd.h (is_enum_type): Renamed is_enum into this,
because of a name clash with a tr1 function when not using C++-11.
(is_pointer_type): Likewise, renamed is_pointer into this because
of a name clash with a tr1 function when not using C++-11.
* src/abg-comp-filter.cc (has_harmless_name_change): Adjust for
the is_enum -> is_enum_type change.
* src/abg-comparison.cc (type_suppression::suppresses_diff):
Likewise.
(class function_suppression::priv): Add a missing "class" keyword
in friend declaration.
(diff_context::diff_has_been_traversed)
(diff_context::mark_diff_as_traversed): Do not use the C++-11
specific type uintptr_t.
* src/abg-dwarf-reader.cc (create_default_dwfl): Do not use
designated initializers. Sigh. This is handy though.
(expr_result::abs): Cast the argument of std::abs to avoid
ambiguous call.
(finish_member_function_reading): Adjust for the is_pointer ->
is_pointer_type renaming.
* src/abg-hash.cc (scope_decl:#️⃣:operator)
(class_decl::base_spec:#️⃣:operator)
(type_composition:#️⃣:operator): Use std::tr1::hash string,
rather than the C++-11 specific std::hash function.
* src/abg-ini.cc (read_sections, write_sections): Make
std::ifstream constructor take a const char* rather than a string.
* src/abg-ir.cc (is_enum_type, is_pointer_type): Renamed is_enum
into is_enum_type and is_pointer into is_pointer_type.
* src/abg-writer.cc (write_translation_unit): Remove useless
typename keyword. Make ofstream take a const char* rather than a
string.
(write_namespace_decl): Remove useless typename keyword.
(write_corpus_to_native_xml_file): Make ofstream take a const
char* rather than a string.
* tests/test-abidiff.cc (main): Make ofstream take a const char*
rather than a string.
* tests/test-diff-dwarf.cc (main): Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* tests/data/test-bidiff: Rename this directory to
tests/data/test-abidiff.
* tests/test-bidiff.cc: Renamed this to tests/test-abidiff.cc.
* tools/biar.cc: Renamed to tools/abiar.cc
* tools/bidiff.cc: Renamed to tools/abidiff.cc
* tools/bidw.cc: Renamed to tools/abidw.cc
* tools/bilint.cc: Renamed to tools/abilint.cc
* tools/bisym.cc: Renamed to tools/abisym.cc
* tests/test-alt-dwarf-file.cc: Renamed references to bidw* to abidw*.
* tests/test-diff-filter.cc: Renamed references to bidiff to abidiff.
* tests/test-lookup-syms.cc: Renamed references to bisym to abisym.
* tools/Makefile.am: Adjust.
* tests/Makefile.am: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>