diff --git a/src/libcalamares/DllMacro.h b/src/libcalamares/DllMacro.h index 865d91d57..9bb789c94 100644 --- a/src/libcalamares/DllMacro.h +++ b/src/libcalamares/DllMacro.h @@ -21,6 +21,10 @@ #include +/* + * Mark symbols exported from Calamares libraries with DLLEXPORT. + * These are the public API of the libraries. + */ #ifndef DLLEXPORT #if defined( DLLEXPORT_PRO ) #define DLLEXPORT Q_DECL_EXPORT @@ -29,6 +33,11 @@ #endif #endif +/* + * Mark symbols exported from Calamares C++ plugins with PLUGINDLLEXPORT. + * These are the public API of the libraries (generally, the plugin + * entry point) + */ #ifndef PLUGINDLLEXPORT #if defined( PLUGINDLLEXPORT_PRO ) #define PLUGINDLLEXPORT Q_DECL_EXPORT @@ -37,4 +46,17 @@ #endif #endif +/* + * For functions that should be static in production but also need to + * be tested, use STATICTEST as linkage specifier. When built as part + * of a test, the function will be given normal linkage. + */ +#ifndef STATICTEST +#if defined( BUILD_AS_TEST ) +#define STATICTEST +#else +#define STATICTEST static +#endif +#endif + #endif