From: Gabriel Corona Date: Thu, 1 Oct 2015 07:27:57 +0000 (+0200) Subject: Detect/fix conflicting visibility and fix visibility wrt lua/java bindings X-Git-Tag: v3_12~79^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bae076147bfc88ce8607f15761149f42d0443585 Detect/fix conflicting visibility and fix visibility wrt lua/java bindings --- diff --git a/include/xbt/base.h b/include/xbt/base.h index fe8038db26..0f34bad192 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -237,13 +237,21 @@ /* UNIX build */ -#else +#elsif defined(__ELF__) + # define XBT_PUBLIC(type) type # define XBT_EXPORT_NO_IMPORT(type) type # define XBT_IMPORT_NO_EXPORT(type) type # define XBT_PUBLIC_DATA(type) extern type # define XBT_PUBLIC_CLASS class +#else +# define XBT_PUBLIC(type) __attribute__((visibility("default"))) type +# define XBT_EXPORT_NO_IMPORT(type) __attribute__((visibility("default"))) type +# define XBT_IMPORT_NO_EXPORT(type) __attribute__((visibility("default"))) type +# define XBT_PUBLIC_DATA(type) extern __attribute__((visibility("default"))) type +# define XBT_PUBLIC_CLASS class __attribute__((visibility("default"))) + #endif #ifdef __ELF__ diff --git a/src/mc/mcer_ignore.cpp b/src/mc/mcer_ignore.cpp index 9922f65525..43fcc42670 100644 --- a/src/mc/mcer_ignore.cpp +++ b/src/mc/mcer_ignore.cpp @@ -153,7 +153,7 @@ static void MC_ignore_local_variable_in_object(const char *var_name, const char *subprogram_name, simgrid::mc::ObjectInformation* info); -XBT_PRIVATE void MC_ignore_local_variable(const char *var_name, const char *frame_name) +void MC_ignore_local_variable(const char *var_name, const char *frame_name) { simgrid::mc::Process* process = &mc_model_checker->process(); if (strcmp(frame_name, "*") == 0) diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index b7d7b9ec53..01bbea57a8 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -160,7 +160,7 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global; XBT_PRIVATE msg_host_t __MSG_host_create(sg_host_t host); XBT_PRIVATE msg_storage_t __MSG_storage_create(smx_storage_t storage); -XBT_PRIVATE void __MSG_host_destroy(msg_host_t host); +void __MSG_host_destroy(msg_host_t host); XBT_PRIVATE void __MSG_host_priv_free(msg_host_priv_t priv); XBT_PRIVATE void __MSG_storage_destroy(msg_storage_priv_t host); XBT_PRIVATE void __MSG_file_destroy(msg_file_priv_t host); diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index 3d4a4eaf65..fbe19f2228 100644 --- a/src/surf/surf_routing.hpp +++ b/src/surf/surf_routing.hpp @@ -23,10 +23,10 @@ XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_ * Classes * ***********/ -class XBT_PRIVATE As; +class As; class XBT_PRIVATE RoutingModelDescription; class XBT_PRIVATE Onelink; -class XBT_PRIVATE RoutingPlatf; +class RoutingPlatf; /** @ingroup SURF_routing_interface * @brief A routing edge diff --git a/src/surf/surf_routing_generic.hpp b/src/surf/surf_routing_generic.hpp index cf104875fe..d397ae19b9 100644 --- a/src/surf/surf_routing_generic.hpp +++ b/src/surf/surf_routing_generic.hpp @@ -13,7 +13,7 @@ class XBT_PRIVATE AsGeneric; -XBT_PRIVATE void generic_free_route(sg_platf_route_cbarg_t route); +void generic_free_route(sg_platf_route_cbarg_t route); class XBT_PRIVATE AsGeneric : public AsNone { public: