From 035a1f7067c4325e866ef872fe539b924a732038 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 25 Jun 2024 11:30:08 -0400 Subject: [PATCH] Use HarfBuzz in Cygwin-w32 build * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper) [CYGWIN]: Use cygharfbuzz-0.dll as HarfBuzz DLL name instead of libharfbuzz-0.dll. (Bug#71766) (cherry picked from commit e7c85f9235af485baba6e398b4f509f14bf80b1c) --- src/w32uniscribe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index b3112912c76..dacd6dd766e 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -1527,12 +1527,17 @@ syms_of_w32uniscribe_for_pdumper (void) uniscribe_new_apis = false; #ifdef HAVE_HARFBUZZ - /* Currently, HarfBuzz DLLs are always named libharfbuzz-0.dll, as + /* Currently, HarfBuzz DLLs are always named libharfbuzz-0.dll on + MS-Windows and cygharfbuzz-0.dll on Cygwin, as the project keeps the ABI backward-compatible. So we can hard-code the name of the library here, for now. If they ever break ABI compatibility, we may need to load the DLL that corresponds to the HarfBuzz version for which Emacs was built. */ +# ifdef WINDOWSNT HMODULE harfbuzz = LoadLibrary ("libharfbuzz-0.dll"); +# else /* CYGWIN */ + HMODULE harfbuzz = LoadLibrary ("cygharfbuzz-0.dll"); +# endif /* CYGWIN */ /* Don't register if HarfBuzz is not available. */ if (!harfbuzz) return; -- 2.39.2