Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wolfi323:branches:KDE:Frameworks5
kdesdk-kioslaves4
fix-build-with-newer-subversion.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-build-with-newer-subversion.patch of Package kdesdk-kioslaves4
diff -U 3 -H -d -p -r -N -- kdesdk-kioslaves-16.04.3.orig/svn/svn.cpp kdesdk-kioslaves-16.04.3/svn/svn.cpp --- kdesdk-kioslaves-16.04.3.orig/svn/svn.cpp 2015-11-30 22:53:44.000000000 +0100 +++ kdesdk-kioslaves-16.04.3/svn/svn.cpp 2018-03-28 22:02:19.000000000 +0200 @@ -56,6 +56,62 @@ using namespace KIO; +/* taken from subversion 1.8 */ +typedef struct svn_sort__item_t { + /** pointer to the key */ + const void *key; + + /** size of the key */ + apr_ssize_t klen; + + /** pointer to the value */ + void *value; +} svn_sort__item_t; + +apr_array_header_t * +svn_sort__hash(apr_hash_t *ht, + int (*comparison_func)(const svn_sort__item_t *, + const svn_sort__item_t *), + apr_pool_t *pool) +{ + apr_hash_index_t *hi; + apr_array_header_t *ary; + svn_boolean_t sorted; + svn_sort__item_t *prev_item; + + /* allocate an array with enough elements to hold all the keys. */ + ary = apr_array_make(pool, apr_hash_count(ht), sizeof(svn_sort__item_t)); + + /* loop over hash table and push all keys into the array */ + sorted = TRUE; + prev_item = NULL; + for (hi = apr_hash_first(pool, ht); hi; hi = apr_hash_next(hi)) + { + svn_sort__item_t *item = (svn_sort__item_t *)apr_array_push(ary); + + apr_hash_this(hi, &item->key, &item->klen, &item->value); + + if (prev_item == NULL) + { + prev_item = item; + continue; + } + + if (sorted) + { + sorted = (comparison_func(prev_item, item) < 0); + prev_item = item; + } + } + + /* quicksort the array if it isn't already sorted. */ + if (!sorted) + qsort(ary->elts, ary->nelts, ary->elt_size, + (int (*)(const void *, const void *))comparison_func); + + return ary; +} + typedef struct { /* Holds the directory that corresponds to the REPOS_URL at RA->open()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor