Skip to content

Commit

Permalink
Finale: Hard-tock DETAIL_IGNITION_PLUGIN_VISIBLE
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed Jul 15, 2022
1 parent b91ad98 commit ba71a7a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions register/include/gz/plugin/detail/Register.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
#include <gz/plugin/utility.hh>


#ifdef DETAIL_IGNITION_PLUGIN_VISIBLE
#undef DETAIL_IGNITION_PLUGIN_VISIBLE
#ifdef DETAIL_GZ_PLUGIN_VISIBLE
#undef DETAIL_GZ_PLUGIN_VISIBLE
#endif

#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define DETAIL_IGNITION_PLUGIN_VISIBLE __attribute__ ((dllexport))
#define DETAIL_GZ_PLUGIN_VISIBLE __attribute__ ((dllexport))
#else
#define DETAIL_IGNITION_PLUGIN_VISIBLE __declspec(dllexport)
#define DETAIL_GZ_PLUGIN_VISIBLE __declspec(dllexport)
#endif
#else
#if __GNUC__ >= 4
#define DETAIL_IGNITION_PLUGIN_VISIBLE __attribute__ ((visibility ("default")))
#define DETAIL_GZ_PLUGIN_VISIBLE __attribute__ ((visibility ("default")))
#else
#define DETAIL_IGNITION_PLUGIN_VISIBLE
#define DETAIL_GZ_PLUGIN_VISIBLE
#endif
#endif

Expand All @@ -59,7 +59,7 @@ extern "C"
/// retrieve Info from a shared library that provides plugins.
///
/// The symbol is explicitly exported (visibility is turned on) using
/// DETAIL_IGNITION_PLUGIN_VISIBLE to ensure that dlsym(~) is able to find it.
/// DETAIL_GZ_PLUGIN_VISIBLE to ensure that dlsym(~) is able to find it.
///
/// DO NOT CALL THIS FUNCTION DIRECTLY OR CREATE YOUR OWN IMPLEMENTATION OF IT
/// This function is used by the Registrar and Loader classes. Nothing else
Expand Down Expand Up @@ -104,7 +104,7 @@ extern "C"
/// Similar to _inputAndOutputInfoSize, this is used for sanity checking. It
/// inspects and returns the alignof(Info) value instead of the sizeof(Info)
/// value.
DETAIL_IGNITION_PLUGIN_VISIBLE void GzPluginHook(
DETAIL_GZ_PLUGIN_VISIBLE void GzPluginHook(
const void *_inputSingleInfo,
const void ** const _outputAllInfo,
int *_inputAndOutputAPIVersion,
Expand Down

0 comments on commit ba71a7a

Please sign in to comment.