pjmsg_mcap_wrapper
Loading...
Searching...
No Matches
visibility.hpp
Go to the documentation of this file.
1/** Defines an MCAP_PUBLIC visibility attribute macro, which is used on all public interfaces.
2 * This can be defined before including `mcap.hpp` to directly control symbol visibility.
3 * If not defined externally, this library attempts to export symbols from the translation unit
4 * where MCAP_IMPLEMENTATION is defined, and import them anywhere else.
5 */
6#ifndef MCAP_PUBLIC
7#if defined _WIN32 || defined __CYGWIN__
8# ifdef MCAP_IMPLEMENTATION
9# ifdef __GNUC__
10# define MCAP_PUBLIC __attribute__((dllexport))
11# else
12# define MCAP_PUBLIC __declspec(dllexport)
13# endif
14# else
15# ifdef __GNUC__
16# define MCAP_PUBLIC __attribute__((dllimport))
17# else
18# define MCAP_PUBLIC __declspec(dllimport)
19# endif
20# endif
21#else
22# if __GNUC__ >= 4
23# define MCAP_PUBLIC __attribute__((visibility("default")))
24# else
25# define MCAP_PUBLIC
26# endif
27#endif
28#endif