include/LibreOfficeKit/LibreOfficeKitInit.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
New commits: commit c32a8c4935891274ae3f0624959bce85a4fdd60e Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Jul 15 09:23:41 2025 +0300 Commit: Michael Stahl <[email protected]> CommitDate: Tue Dec 2 10:00:01 2025 +0100 Use more obvious macro names Instead of TARGET_LIB, just call it SOFFICEAPP_LIB, as it is the "sofficeapp" dynamic library that it always refers to. And instead of TARGET_MERGED_LIB, just call it MERGED_LIB, as that always refers to the "mergedlo" dynamic library. Change-Id: Ic3a8f29cd9b168f064bc2d02f15341b5ea1afef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194593 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index 4ee1f8e5a97d..c2d7817cc3c8 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -32,15 +32,15 @@ #include <dlfcn.h> #ifdef __APPLE__ - #define TARGET_LIB "lib" "sofficeapp" ".dylib" - #define TARGET_MERGED_LIB "lib" "mergedlo" ".dylib" + #define SOFFICEAPP_LIB "libsofficeapp.dylib" + #define MERGED_LIB "libmergedlo.dylib" #if (!defined TARGET_OS_IPHONE || TARGET_OS_IPHONE == 0) && (!defined TARGET_OS_OSX || TARGET_OS_OSX == 0) #error LibreOfficeKit is not supported on tvOS, visionOS or watchOS #endif #else - #define TARGET_LIB "lib" "sofficeapp" ".so" - #define TARGET_MERGED_LIB "lib" "mergedlo" ".so" + #define SOFFICEAPP_LIB "libsofficeapp.so" + #define MERGED_LIB "libmergedlo.so" #endif #define SEPARATOR '/' @@ -49,11 +49,11 @@ #if !defined WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif - #include <windows.h> - #define TARGET_LIB "sofficeapp" ".dll" - #define TARGET_MERGED_LIB "mergedlo" ".dll" - #define SEPARATOR '\' - #define UNOPATH "\..\URE\bin" + #include <windows.h> + #define SOFFICEAPP_LIB "sofficeapp.dll" + #define MERGED_LIB "mergedlo.dll" + #define SEPARATOR '\' + #define UNOPATH "\..\URE\bin" #undef DELETE @@ -202,7 +202,7 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) // allocate large enough buffer partial_length = strlen(install_path); - imp_lib_size = partial_length + sizeof(TARGET_LIB) + sizeof(TARGET_MERGED_LIB) + 2; + imp_lib_size = partial_length + sizeof(SOFFICEAPP_LIB) + sizeof(MERGED_LIB) + 2; imp_lib = (char *) malloc(imp_lib_size); if (!imp_lib) { @@ -215,10 +215,10 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) extendUnoPath(install_path); imp_lib[partial_length++] = SEPARATOR; - strncpy(imp_lib + partial_length, TARGET_LIB, imp_lib_size - partial_length); + strncpy(imp_lib + partial_length, SOFFICEAPP_LIB, imp_lib_size - partial_length); struct stat st; - // If TARGET_LUB exists but is ridiculously small, it is the + // If SOFFICEAPP_LUB exists but is ridiculously small, it is the // one-line text stub as in the --enable-mergedlib case. if (stat(imp_lib, &st) == 0 && st.st_size > 1000) { @@ -235,7 +235,7 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) } else { - strncpy(imp_lib + partial_length, TARGET_MERGED_LIB, imp_lib_size - partial_length); + strncpy(imp_lib + partial_length, MERGED_LIB, imp_lib_size - partial_length); dlhandle = lok_loadlib(imp_lib); if (!dlhandle)
