diff options
| author | Pierre Pronchery <khorben@FreeBSD.org> | 2026-04-22 13:13:41 +0000 |
|---|---|---|
| committer | Pierre Pronchery <khorben@FreeBSD.org> | 2026-04-22 13:13:41 +0000 |
| commit | 6294b6ab217a2d5f1d2bc23a64505a228294c508 (patch) | |
| tree | 333ee95d0d49af6cfc4390c1ec90098e6493e332 /libpkgconf/libpkgconf-api.h | |
Diffstat (limited to 'libpkgconf/libpkgconf-api.h')
| -rw-r--r-- | libpkgconf/libpkgconf-api.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libpkgconf/libpkgconf-api.h b/libpkgconf/libpkgconf-api.h new file mode 100644 index 000000000000..a924c80ce833 --- /dev/null +++ b/libpkgconf/libpkgconf-api.h @@ -0,0 +1,19 @@ +#ifndef LIBPKGCONF_LIBPKGCONF_API_H +#define LIBPKGCONF_LIBPKGCONF_API_H + +/* Makefile.am specifies visibility using the libtool option -export-symbols-regex '^pkgconf_' + * Unfortunately, that is not available when building with meson, so use attributes instead. + */ +#if defined(PKGCONFIG_IS_STATIC) +# define PKGCONF_API +#elif defined(_WIN32) || defined(_WIN64) +# if defined(LIBPKGCONF_EXPORT) || defined(DLL_EXPORT) +# define PKGCONF_API __declspec(dllexport) +# else +# define PKGCONF_API __declspec(dllimport) +# endif +#else +# define PKGCONF_API __attribute__((visibility("default"))) +#endif + +#endif |
