Skip to content

build: correct export decoration macros #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions src/include/cmark-gfm_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
# define CMARK_GFM_EXPORT
# define CMARK_GFM_NO_EXPORT
#else
# ifndef CMARK_GFM_EXPORT
# ifdef libcmark_gfm_EXPORTS
/* We are building this library */
# define CMARK_GFM_EXPORT __attribute__((visibility("default")))
# if defined(_WIN32)
# if defined(libcmark_gfm_EXPORTS)
# define CMARK_GFM_EXPORT __declspec(dllexport)
# else
/* We are using this library */
# define CMARK_GFM_EXPORT __attribute__((visibility("default")))
# define CMARK_GFM_EXPORT __declspec(dllimport)
# endif
# endif

# ifndef CMARK_GFM_NO_EXPORT
# define CMARK_GFM_NO_EXPORT __attribute__((visibility("hidden")))
# define CMARK_GFM_NO_EXPORT
# else
# if defined(libcmark_gfm_EXPORTS)
# if defined(__linux__)
# define CMARK_GFM_EXPORT __attribute__((__visibility__("protected")))
# else
# define CMARK_GFM_EXPORT __attribute__((__visibility__("default")))
# endif
# else
# define CMARK_GFM_EXPORT __attribute__((__visibility__("default")))
# endif
# define CMARK_GFM_NO_EXPORT __attribute__((__visibility__("hidden")))
# endif
#endif

Expand Down