From f53328a8c70c01f40d36474c1b1efa272c29d6f7 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 28 Jun 2013 18:28:35 +0200 Subject: [PATCH] Use -fvisibility=hidden for all parsers. * src/eltlparse/Makefile.am, src/kripkeparse/Makefile.am, src/ltlparse/Makefile.am, src/neverparse/Makefile.am, src/tgbaparse/Makefile.am: Use $(VISIBILITY_CXXFLAGS) * src/eltlparse/public.hh, src/kripkeparse/public.hh, src/ltlparse/ltlfile.hh, src/ltlparse/public.hh, src/neverparse/public.hh, src/tgbaparse/public.hh: Mark public symbols with SPOT_API. --- src/eltlparse/Makefile.am | 2 +- src/eltlparse/public.hh | 3 +++ src/kripkeparse/Makefile.am | 2 +- src/kripkeparse/public.hh | 3 ++- src/ltlparse/Makefile.am | 2 +- src/ltlparse/ltlfile.hh | 7 ++++--- src/ltlparse/public.hh | 6 ++++++ src/neverparse/Makefile.am | 2 +- src/neverparse/public.hh | 22 +++++++++++----------- src/tgbaparse/Makefile.am | 2 +- src/tgbaparse/public.hh | 2 ++ 11 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/eltlparse/Makefile.am b/src/eltlparse/Makefile.am index 91f6bba7a..1e38c9680 100644 --- a/src/eltlparse/Makefile.am +++ b/src/eltlparse/Makefile.am @@ -19,7 +19,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. -I.. -DYY_NO_INPUT # Disable -Werror because too many versions of flex yield warnings. -AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) +AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) $(VISIBILITY_CXXFLAGS) eltlparsedir = $(pkgincludedir)/eltlparse diff --git a/src/eltlparse/public.hh b/src/eltlparse/public.hh index eb5364f6a..939d974fa 100644 --- a/src/eltlparse/public.hh +++ b/src/eltlparse/public.hh @@ -55,6 +55,7 @@ namespace spot /// 0 if the file could not be opened. /// /// \warning This function is not reentrant. + SPOT_API const formula* parse_file(const std::string& filename, parse_error_list& error_list, environment& env = @@ -71,6 +72,7 @@ namespace spot /// 0 if the input was unparsable. /// /// \warning This function is not reentrant. + SPOT_API const formula* parse_string(const std::string& eltl_string, parse_error_list& error_list, environment& env = @@ -82,6 +84,7 @@ namespace spot /// \param error_list The error list filled by spot::eltl::parse while /// parsing \a eltl_string. /// \return \c true iff any diagnostic was output. + SPOT_API bool format_parse_errors(std::ostream& os, parse_error_list& error_list); diff --git a/src/kripkeparse/Makefile.am b/src/kripkeparse/Makefile.am index 8b5d531e7..2c6136827 100644 --- a/src/kripkeparse/Makefile.am +++ b/src/kripkeparse/Makefile.am @@ -18,7 +18,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) -DYY_NO_INPUT # Disable -Werror because too many versions of flex yield warnings. -AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) +AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) $(VISIBILITY_CXXFLAGS) kripkeparsedir = $(pkgincludedir)/kripkeparse diff --git a/src/kripkeparse/public.hh b/src/kripkeparse/public.hh index 6320f386e..0ce797475 100644 --- a/src/kripkeparse/public.hh +++ b/src/kripkeparse/public.hh @@ -38,7 +38,7 @@ namespace spot - kripke_explicit* + SPOT_API kripke_explicit* kripke_parse(const std::string& name, kripke_parse_error_list& error_list, bdd_dict* dict, @@ -53,6 +53,7 @@ namespace spot /// \param error_list The error list filled by spot::ltl::parse while /// parsing \a ltl_string. /// \return \c true if any diagnostic was output. + SPOT_API bool format_kripke_parse_errors(std::ostream& os, const std::string& filename, kripke_parse_error_list& error_list); diff --git a/src/ltlparse/Makefile.am b/src/ltlparse/Makefile.am index d7f4b6935..498e7a4b4 100644 --- a/src/ltlparse/Makefile.am +++ b/src/ltlparse/Makefile.am @@ -21,7 +21,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)/.. -I.. -DYY_NO_INPUT # Disable -Werror because too many versions of flex yield warnings. -AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) +AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) $(VISIBILITY_CXXFLAGS) ltlparsedir = $(pkgincludedir)/ltlparse diff --git a/src/ltlparse/ltlfile.hh b/src/ltlparse/ltlfile.hh index 8e4572574..91a0817f6 100644 --- a/src/ltlparse/ltlfile.hh +++ b/src/ltlparse/ltlfile.hh @@ -1,5 +1,6 @@ -// Copyright (C) 2010, 2012 Laboratoire de Recherche et Développement -// de l'Epita (LRDE). +// -*- coding: utf-8 -*- +// Copyright (C) 2010, 2012, 2013 Laboratoire de Recherche et +// DĂ©veloppement de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -29,7 +30,7 @@ namespace spot /// \ingroup ltl_io /// \brief Read LTL formulae from a file, one by one - class ltl_file + class SPOT_API ltl_file { public: ltl_file(const std::string& filename); diff --git a/src/ltlparse/public.hh b/src/ltlparse/public.hh index 770890c8a..e2a8d1113 100644 --- a/src/ltlparse/public.hh +++ b/src/ltlparse/public.hh @@ -66,6 +66,7 @@ namespace spot /// was parsed succesfully, check \a error_list for emptiness. /// /// \warning This function is not reentrant. + SPOT_API const formula* parse(const std::string& ltl_string, parse_error_list& error_list, environment& env = default_environment::instance(), @@ -90,6 +91,7 @@ namespace spot /// was parsed succesfully, check \a error_list for emptiness. /// /// \warning This function is not reentrant. + SPOT_API const formula* parse_boolean(const std::string& ltl_string, parse_error_list& error_list, environment& env = @@ -116,6 +118,7 @@ namespace spot /// double-quoted atomic propositions that do not start with 'p'. /// /// \warning This function is not reentrant. + SPOT_API const formula* parse_lbt(const std::string& ltl_string, parse_error_list& error_list, environment& env = default_environment::instance(), @@ -139,6 +142,7 @@ namespace spot /// was parsed succesfully, check \a error_list for emptiness. /// /// \warning This function is not reentrant. + SPOT_API const formula* parse_sere(const std::string& sere_string, parse_error_list& error_list, environment& env = @@ -159,6 +163,7 @@ namespace spot /// \param error_list The error list filled by spot::ltl::parse /// or spot::ltl::parse_sere while parsing \a input_string. /// \return \c true iff any diagnostic was output. + SPOT_API bool format_parse_errors(std::ostream& os, const std::string& input_string, const parse_error_list& error_list); @@ -186,6 +191,7 @@ namespace spot /// \param input_string The string that were parsed. /// \param error_list The error list filled by spot::ltl::parse /// or spot::ltl::parse_sere while parsing \a input_string. + SPOT_API void fix_utf8_locations(const std::string& input_string, parse_error_list& error_list); diff --git a/src/neverparse/Makefile.am b/src/neverparse/Makefile.am index 904807c5e..1cd333c0e 100644 --- a/src/neverparse/Makefile.am +++ b/src/neverparse/Makefile.am @@ -19,7 +19,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. -I.. $(BUDDY_CPPFLAGS) -DYY_NO_INPUT # Disable -Werror because too many versions of flex yield warnings. -AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) +AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) $(VISIBILITY_CXXFLAGS) neverparsedir = $(pkgincludedir)/neverparse diff --git a/src/neverparse/public.hh b/src/neverparse/public.hh index acc95c11a..15477e5e6 100644 --- a/src/neverparse/public.hh +++ b/src/neverparse/public.hh @@ -55,14 +55,13 @@ namespace spot /// was parsed succesfully, check \a error_list for emptiness. /// /// \warning This function is not reentrant. - tgba_explicit_string* neverclaim_parse( - const std::string& filename, - neverclaim_parse_error_list& - error_list, - bdd_dict* dict, - ltl::environment& env - = ltl::default_environment::instance(), - bool debug = false); + SPOT_API tgba_explicit_string* + neverclaim_parse(const std::string& filename, + neverclaim_parse_error_list& + error_list, + bdd_dict* dict, + ltl::environment& env = ltl::default_environment::instance(), + bool debug = false); /// \brief Format diagnostics produced by spot::neverclaim_parse. /// \param os Where diagnostics should be output. @@ -70,9 +69,10 @@ namespace spot /// \param error_list The error list filled by spot::ltl::parse while /// parsing \a ltl_string. /// \return \c true iff any diagnostic was output. - bool format_neverclaim_parse_errors(std::ostream& os, - const std::string& filename, - neverclaim_parse_error_list& error_list); + SPOT_API bool + format_neverclaim_parse_errors(std::ostream& os, + const std::string& filename, + neverclaim_parse_error_list& error_list); /// @} } diff --git a/src/tgbaparse/Makefile.am b/src/tgbaparse/Makefile.am index eeb67ce86..164e795f7 100644 --- a/src/tgbaparse/Makefile.am +++ b/src/tgbaparse/Makefile.am @@ -22,7 +22,7 @@ AM_CPPFLAGS = -I$(srcdir)/.. -I.. $(BUDDY_CPPFLAGS) -DYY_NO_INPUT # Disable -Werror because too many versions of flex yield warnings. -AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) +AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=) $(VISIBILITY_CXXFLAGS) tgbaparsedir = $(pkgincludedir)/tgbaparse diff --git a/src/tgbaparse/public.hh b/src/tgbaparse/public.hh index 85e9837eb..a62ed25e8 100644 --- a/src/tgbaparse/public.hh +++ b/src/tgbaparse/public.hh @@ -65,6 +65,7 @@ namespace spot /// was parsed succesfully, check \a error_list for emptiness. /// /// \warning This function is not reentrant. + SPOT_API tgba_explicit_string* tgba_parse(const std::string& filename, tgba_parse_error_list& error_list, bdd_dict* dict, @@ -80,6 +81,7 @@ namespace spot /// \param error_list The error list filled by spot::ltl::parse while /// parsing \a ltl_string. /// \return \c true iff any diagnostic was output. + SPOT_API bool format_tgba_parse_errors(std::ostream& os, const std::string& filename, tgba_parse_error_list& error_list);