Skip to content

Commit da554bb

Browse files
committed
Use SVN_DSO_SUFFIX_FMT definition for determining the name of the DSO
auth modules when loading them. As it is required, always setup the SVN_DSO_SUFFIX_FMT definition even if we don't use DSO modules for FS and RA modules on CMake and autoconf build systems. Also this fixes incorrect loading of the auth libraries with CMake, that builds the libraries with different names (going to be fixed soon). * CMakeLists.txt (dso): Move SVN_DSO_SUFFIX_FMT setting outside from if(SVN_USE_DSO). * configure.ac (dso): Move DSO settings outside from the block, executed only in case of enabled --enable-runtime-module-search option. * subversion/libsvn_subr/auth.c (svn_auth_get_platform_specific_provider->library_name): Replace '%d.so.%d' constant in library name template string with SVN_DSO_SUFFIX_FMT, which actually should be the same on Linux, the only platform this code is running on, following no functional changes with autoconf. git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1921144 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6d82006 commit da554bb

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ endif()
151151

152152
if(SVN_USE_DSO)
153153
add_compile_definitions("SVN_USE_DSO")
154-
string(APPEND PRIVATE_CONFIG_DEFINITIONS
155-
"\n"
156-
"/* Shared library file name suffix format */\n"
157-
"#define SVN_DSO_SUFFIX_FMT \"%d${CMAKE_SHARED_LIBRARY_SUFFIX}\"\n"
158-
)
159154
endif()
160155

156+
string(APPEND PRIVATE_CONFIG_DEFINITIONS
157+
"\n"
158+
"/* Shared library file name suffix format */\n"
159+
"#define SVN_DSO_SUFFIX_FMT \"%d${CMAKE_SHARED_LIBRARY_SUFFIX}\"\n"
160+
)
161161
add_compile_definitions("SVN_SOVERSION=1")
162162

163163
if (SVN_ENABLE_TESTS)

configure.ac

+13-13
Original file line numberDiff line numberDiff line change
@@ -1492,22 +1492,22 @@ AS_HELP_STRING([--enable-runtime-module-search],
14921492
fi
14931493
AC_DEFINE(SVN_USE_DSO, 1,
14941494
[Defined if svn should try to load DSOs])
1495-
1496-
dnl Mac OS X uses libname.MAJOR.SOVERSION.dylib
1497-
dnl Most other unixes use libname.MAJOR.so.SOVERSION
1498-
case "$host" in
1499-
*-*-darwin*)
1500-
AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.%d.dylib"],
1501-
[Shared library file name suffix format])
1502-
;;
1503-
*)
1504-
AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.so.%d"],
1505-
[Shared library file name suffix format])
1506-
;;
1507-
esac
15081495
fi
15091496
])
15101497

1498+
dnl Mac OS X uses libname.MAJOR.SOVERSION.dylib
1499+
dnl Most other unixes use libname.MAJOR.so.SOVERSION
1500+
case "$host" in
1501+
*-*-darwin*)
1502+
AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.%d.dylib"],
1503+
[Shared library file name suffix format])
1504+
;;
1505+
*)
1506+
AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.so.%d"],
1507+
[Shared library file name suffix format])
1508+
;;
1509+
esac
1510+
15111511
if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then
15121512
AC_DEFINE(SVN_LIBSVN_RA_LINKS_RA_LOCAL, 1,
15131513
[Defined if libsvn_ra should link against libsvn_ra_local])

subversion/libsvn_subr/auth.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ svn_auth_get_platform_specific_provider(svn_auth_provider_object_t **provider,
508508
const char *library_label, *library_name;
509509
const char *provider_function_name, *version_function_name;
510510
library_name = apr_psprintf(pool,
511-
"libsvn_auth_%s-%d.so.%d",
511+
"libsvn_auth_%s-" SVN_DSO_SUFFIX_FMT,
512512
provider_name,
513513
SVN_VER_MAJOR, SVN_SOVERSION);
514514
library_label = apr_psprintf(pool, "svn_%s", provider_name);

0 commit comments

Comments
 (0)