summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/glyphs
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-01-18 07:29:40 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-18 13:44:53 +0100
commitb5b1eae538a902fed165d5dd93ad6ddda3c5cb70 (patch)
treeda127f648f8dfa30abae0d20a0dffe9947206e9c /vcl/unx/generic/glyphs
parent31700036e517691d154701f4b8aeecb85cde607f (diff)
Add HAVE_(UNIX_)DLAPI config header define
..., add the configure test flags and rename DLOPEN_LIBS to UNIX_DLAPI_LIBS. Initinally convert two dlsym callers to use HAVE_DLAPI and osl_getAsciiFunctionSymbol. There are a lot of places, which still use -ldl and even more direct dlsym calls; good opportunity for many simple EasyHacks. Change-Id: I4f2d2f7cb079a075af8f9d01eb5ee45de40c7f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128523 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx/generic/glyphs')
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index f199074a75c7..34bc8e7f051a 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -34,6 +34,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <sal/log.hxx>
+#include <osl/module.h>
#include <langboost.hxx>
#include <font/PhysicalFontCollection.hxx>
@@ -161,11 +162,16 @@ namespace
{
void dlFT_Done_MM_Var(FT_Library library, FT_MM_Var *amaster)
{
- static auto func = reinterpret_cast<void(*)(FT_Library, FT_MM_Var*)>(dlsym(nullptr, "FT_Done_MM_Var"));
+#if !HAVE_DLAPI
+ FT_Done_MM_Var(library, amaster);
+#else
+ static auto func = reinterpret_cast<void(*)(FT_Library, FT_MM_Var*)>(
+ osl_getAsciiFunctionSymbol(nullptr, "FT_Done_MM_Var"));
if (func)
func(library, amaster);
else
free(amaster);
+#endif
}
}