Author: rinrab
Date: Sat Sep 28 09:08:57 2024
New Revision: 1921006
URL: http://svn.apache.org/viewvc?rev=1921006&view=rev
Log:
Merge the `windows-shared-ra-modules` branch to trunk.
What's included
---------------
- Add ra_init.h headers to each RA module with init function and compat init
function. This is needed for exporting them from the DLLs.
- Deprecated functions from public API (of svn_ra.h) like
svn_ra_foo_init will be implemented in libsvn_ra library
instead of RA modules. Each RA module exports other private
functions instead of implementing svn_ra.h straight out.
Then, libsvn_ra wraps svn_ra_foo__compat_init into svn_ra_foo_init,
or returns SVN_ERR_RA_NOT_IMPLEMENTED if not linked against the
library. Also moving these implementations into deprecated.c
file, since it is compatibility API.
- Export required headers from the RA modules.
- Link libsvn_ra against aprutil library, because it is a dependency of this
library.
- Support shared RA modules on with CMake on Windows (only CMake will support
this for now).
Added:
subversion/trunk/subversion/libsvn_ra_local/ra_init.h
- copied unchanged from r1921005,
subversion/branches/windows-shared-ra-modules/subversion/libsvn_ra_local/ra_init.h
subversion/trunk/subversion/libsvn_ra_serf/ra_init.h
- copied unchanged from r1921005,
subversion/branches/windows-shared-ra-modules/subversion/libsvn_ra_serf/ra_init.h
subversion/trunk/subversion/libsvn_ra_svn/ra_init.h
- copied unchanged from r1921005,
subversion/branches/windows-shared-ra-modules/subversion/libsvn_ra_svn/ra_init.h
Removed:
subversion/trunk/subversion/libsvn_ra/deprecated.h
Modified:
subversion/trunk/ (props changed)
subversion/trunk/CMakeLists.txt
subversion/trunk/build.conf
subversion/trunk/subversion/libsvn_fs_x/ (props changed)
subversion/trunk/subversion/libsvn_ra/deprecated.c
subversion/trunk/subversion/libsvn_ra/ra_loader.c
subversion/trunk/subversion/libsvn_ra/ra_loader.h
subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
subversion/trunk/subversion/libsvn_ra_serf/serf.c
subversion/trunk/subversion/libsvn_ra_svn/client.c
Propchange: subversion/trunk/
------------------------------------------------------------------------------
Merged /subversion/branches/windows-shared-ra-modules:r1920808-1921005
Modified: subversion/trunk/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Sat Sep 28 09:08:57 2024
@@ -95,7 +95,7 @@ option(SVN_INSTALL_PRIVATE_H "Instal pri
# Configuration
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
cmake_dependent_option(SVN_BUILD_SHARED_FS "Build shared FS modules" ON
"BUILD_SHARED_LIBS" OFF)
-cmake_dependent_option(SVN_BUILD_SHARED_RA "Build shared RA modules" ON
"BUILD_SHARED_LIBS;LINUX" OFF)
+cmake_dependent_option(SVN_BUILD_SHARED_RA "Build shared RA modules" ON
"BUILD_SHARED_LIBS" OFF)
option(SVN_DEBUG "Enables specific features for developer builds" OFF)
cmake_dependent_option(SVN_USE_WIN32_CRASHHANDLER "Enables WIN32 crash
handler." ON "WIN32" OFF)
option(SVN_USE_DSO "Defined if svn should try to load DSOs" OFF)
@@ -162,10 +162,6 @@ else()
set(SVN_RA_BUILD_TYPE STATIC)
endif()
-if(SVN_BUILD_SHARED_RA AND WIN32)
- message(FATAL_ERROR "SVN_BUILD_SHARED_RA not yet supported on Windows")
-endif()
-
if(SVN_ENABLE_FS_BASE)
message(FATAL_ERROR "SVN_ENABLE_FS_BASE is NOT implemented and deprecated.")
endif()
Modified: subversion/trunk/build.conf
URL:
http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Sat Sep 28 09:08:57 2024
@@ -338,7 +338,7 @@ msvc-export = private/svn_fs_util.h
description = Subversion General Repository Access Library
type = lib
path = subversion/libsvn_ra
-libs = libsvn_delta libsvn_subr ra-libs apriconv apr
+libs = libsvn_delta libsvn_subr ra-libs apriconv apr aprutil
# conditionally add more dependencies
add-deps = $(SVN_RA_LIB_DEPS)
add-install-deps = $(SVN_RA_LIB_INSTALL_DEPS)
@@ -355,6 +355,7 @@ install = serf-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr serf zlib
add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
msvc-static = yes
+msvc-export = ../libsvn_ra_serf/ra_init.h ../libsvn_ra_serf/ra_serf.h
# Accessing repositories via SVN
[libsvn_ra_svn]
@@ -364,6 +365,7 @@ path = subversion/libsvn_ra_svn
install = ramod-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr sasl
msvc-static = yes
+msvc-export = ../libsvn_ra_svn/ra_init.h svn_ra_svn.h
private/svn_ra_svn_private.h
# Accessing repositories via direct libsvn_fs
[libsvn_ra_local]
@@ -373,6 +375,7 @@ path = subversion/libsvn_ra_local
install = ramod-lib
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
msvc-static = yes
+msvc-export = ../libsvn_ra_local/ra_init.h ../libsvn_ra_local/ra_local.h
# Routines built on top of libsvn_fs
[libsvn_repos]
Propchange: subversion/trunk/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
Merged
/subversion/branches/windows-shared-ra-modules/subversion/libsvn_fs_x:r1920808-1921005
Modified: subversion/trunk/subversion/libsvn_ra/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/deprecated.c?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_ra/deprecated.c Sat Sep 28 09:08:57 2024
@@ -34,7 +34,11 @@
#include "svn_pools.h"
#include "ra_loader.h"
-#include "deprecated.h"
+
+/* Declarations of the init functions for the available RA libraries. */
+#include "../libsvn_ra_local/ra_init.h"
+#include "../libsvn_ra_svn/ra_init.h"
+#include "../libsvn_ra_serf/ra_init.h"
#include "svn_private_config.h"
@@ -497,26 +501,52 @@ svn_error_t *svn_ra_get_dir(svn_ra_sessi
path, revision, SVN_DIRENT_ALL, pool);
}
+/* For each libsvn_ra_foo library, provide an implementation of deprecated
+ svn_ra_foo_init function that wraps svn_ra_foo__compat_init, or returns
+ a "not implemented" error if it was not linked. */
+
+#ifndef SVN_LIBSVN_RA_LINKS_RA_NEON
svn_error_t *
-svn_ra_local__deprecated_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
+svn_ra_dav_init(int abi_version,
+ apr_pool_t *pool,
+ apr_hash_t *hash)
{
- return svn_error_trace(svn_ra_local_init(abi_version, pool, hash));
+ return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
}
+#endif /* ! SVN_LIBSVN_RA_LINKS_RA_NEON */
svn_error_t *
-svn_ra_svn__deprecated_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
-{
- return svn_error_trace(svn_ra_svn_init(abi_version, pool, hash));
+svn_ra_svn_init(int abi_version,
+ apr_pool_t *pool,
+ apr_hash_t *hash)
+{
+#ifdef SVN_LIBSVN_RA_LINKS_RA_SVN
+ return svn_error_trace(svn_ra_svn__compat_init(abi_version, pool, hash));
+#else
+ return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
+#endif /* ! SVN_LIBSVN_RA_LINKS_RA_SVN */
}
svn_error_t *
-svn_ra_serf__deprecated_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
-{
- return svn_error_trace(svn_ra_serf_init(abi_version, pool, hash));
+svn_ra_local_init(int abi_version,
+ apr_pool_t *pool,
+ apr_hash_t *hash)
+{
+#ifdef SVN_LIBSVN_RA_LINKS_RA_LOCAL
+ return svn_error_trace(svn_ra_local__compat_init(abi_version, pool, hash));
+#else
+ return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
+#endif /* ! SVN_LIBSVN_RA_LINKS_RA_LOCAL */
+}
+
+svn_error_t *
+svn_ra_serf_init(int abi_version,
+ apr_pool_t *pool,
+ apr_hash_t *hash)
+{
+#ifdef SVN_LIBSVN_RA_LINKS_RA_SERF
+ return svn_error_trace(svn_ra_serf__compat_init(abi_version, pool, hash));
+#else
+ return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
+#endif /* ! SVN_LIBSVN_RA_LINKS_RA_SERF */
}
Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Sat Sep 28 09:08:57 2024
@@ -50,12 +50,15 @@
#include "svn_config.h"
#include "ra_loader.h"
-#include "deprecated.h"
#include "private/svn_auth_private.h"
#include "private/svn_ra_private.h"
#include "svn_private_config.h"
+/* Declarations of the init functions for the available RA libraries. */
+#include "../libsvn_ra_local/ra_init.h"
+#include "../libsvn_ra_svn/ra_init.h"
+#include "../libsvn_ra_serf/ra_init.h"
@@ -82,7 +85,7 @@ static const struct ra_lib_defn {
svn_schemes,
#ifdef SVN_LIBSVN_RA_LINKS_RA_SVN
svn_ra_svn__init,
- svn_ra_svn__deprecated_init
+ svn_ra_svn__compat_init
#endif
},
@@ -91,7 +94,7 @@ static const struct ra_lib_defn {
local_schemes,
#ifdef SVN_LIBSVN_RA_LINKS_RA_LOCAL
svn_ra_local__init,
- svn_ra_local__deprecated_init
+ svn_ra_local__compat_init
#endif
},
@@ -100,7 +103,7 @@ static const struct ra_lib_defn {
dav_schemes,
#ifdef SVN_LIBSVN_RA_LINKS_RA_SERF
svn_ra_serf__init,
- svn_ra_serf__deprecated_init
+ svn_ra_serf__compat_init
#endif
},
@@ -1567,47 +1570,3 @@ svn_ra_get_ra_library(svn_ra_plugin_t **
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
_("Unrecognized URL scheme '%s'"), url);
}
-
-/* For each libsvn_ra_foo library that is not linked in, provide a default
- implementation for svn_ra_foo_init which returns a "not implemented"
- error. */
-
-#ifndef SVN_LIBSVN_RA_LINKS_RA_NEON
-svn_error_t *
-svn_ra_dav_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
-{
- return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
-}
-#endif /* ! SVN_LIBSVN_RA_LINKS_RA_NEON */
-
-#ifndef SVN_LIBSVN_RA_LINKS_RA_SVN
-svn_error_t *
-svn_ra_svn_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
-{
- return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
-}
-#endif /* ! SVN_LIBSVN_RA_LINKS_RA_SVN */
-
-#ifndef SVN_LIBSVN_RA_LINKS_RA_LOCAL
-svn_error_t *
-svn_ra_local_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
-{
- return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
-}
-#endif /* ! SVN_LIBSVN_RA_LINKS_RA_LOCAL */
-
-#ifndef SVN_LIBSVN_RA_LINKS_RA_SERF
-svn_error_t *
-svn_ra_serf_init(int abi_version,
- apr_pool_t *pool,
- apr_hash_t *hash)
-{
- return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
-}
-#endif /* ! SVN_LIBSVN_RA_LINKS_RA_SERF */
Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.h?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.h Sat Sep 28 09:08:57 2024
@@ -419,17 +419,6 @@ typedef svn_error_t *
const svn_ra__vtable_t **vtable,
apr_pool_t *pool);
-/* Declarations of the init functions for the available RA libraries. */
-svn_error_t *svn_ra_local__init(const svn_version_t *loader_version,
- const svn_ra__vtable_t **vtable,
- apr_pool_t *pool);
-svn_error_t *svn_ra_svn__init(const svn_version_t *loader_version,
- const svn_ra__vtable_t **vtable,
- apr_pool_t *pool);
-svn_error_t *svn_ra_serf__init(const svn_version_t *loader_version,
- const svn_ra__vtable_t **vtable,
- apr_pool_t *pool);
-
/*** Compat Functions ***/
Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Sat Sep 28 09:08:57
2024
@@ -22,6 +22,7 @@
*/
#include "ra_local.h"
+#include "ra_init.h"
#include "svn_hash.h"
#include "svn_ra.h"
#include "svn_fs.h"
@@ -1997,5 +1998,5 @@ svn_ra_local__init(const svn_version_t *
#define DESCRIPTION RA_LOCAL_DESCRIPTION
#define VTBL ra_local_vtable
#define INITFUNC svn_ra_local__init
-#define COMPAT_INITFUNC svn_ra_local_init
+#define COMPAT_INITFUNC svn_ra_local__compat_init
#include "../libsvn_ra/wrapper_template.h"
Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/serf.c?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Sat Sep 28 09:08:57 2024
@@ -49,6 +49,7 @@
#include "private/svn_subr_private.h"
#include "svn_private_config.h"
+#include "ra_init.h"
#include "ra_serf.h"
@@ -1127,5 +1128,5 @@ svn_ra_serf__init(const svn_version_t *l
#define DESCRIPTION RA_SERF_DESCRIPTION
#define VTBL serf_vtable
#define INITFUNC svn_ra_serf__init
-#define COMPAT_INITFUNC svn_ra_serf_init
+#define COMPAT_INITFUNC svn_ra_serf__compat_init
#include "../libsvn_ra/wrapper_template.h"
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1921006&r1=1921005&r2=1921006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Sat Sep 28 09:08:57 2024
@@ -56,6 +56,7 @@
#include "../libsvn_ra/ra_loader.h"
+#include "ra_init.h"
#include "ra_svn.h"
#ifdef SVN_HAVE_SASL
@@ -3372,5 +3373,5 @@ svn_ra_svn__init(const svn_version_t *lo
#define DESCRIPTION RA_SVN_DESCRIPTION
#define VTBL ra_svn_vtable
#define INITFUNC svn_ra_svn__init
-#define COMPAT_INITFUNC svn_ra_svn_init
+#define COMPAT_INITFUNC svn_ra_svn__compat_init
#include "../libsvn_ra/wrapper_template.h"