Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/hash.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/hash.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/hash.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/hash.c Sun Jun 14 
20:58:10 2015
@@ -31,10 +31,14 @@
 #include <apr_hash.h>
 #include <apr_file_io.h>
 
+#ifndef SVN_HASH__GETS_SETS
+#define SVN_HASH__GETS_SETS
+#endif
+#include "svn_hash.h"
+
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
-#include "svn_hash.h"
 #include "svn_sorts.h"
 #include "svn_io.h"
 #include "svn_pools.h"
@@ -45,7 +49,6 @@
 
 #include "svn_private_config.h"
 
-
 
 
 /*
@@ -132,7 +135,7 @@ svn_hash__read_entry(svn_hash__entry_t *
                                   0, APR_SIZE_MAX, 10);
       if (err)
         return svn_error_create(SVN_ERR_MALFORMED_FILE, err,
-                                _("Serialized hash malformed"));
+                                _("Serialized hash malformed key length"));
       entry->keylen = (apr_size_t)ui64;
 
       /* Now read that much into a buffer. */
@@ -145,19 +148,19 @@ svn_hash__read_entry(svn_hash__entry_t *
       SVN_ERR(svn_stream_read_full(stream, &c, &len));
       if (c != '\n')
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                _("Serialized hash malformed"));
+                                _("Serialized hash malformed key data"));
 
       /* Read a val length line */
       SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eof, pool));
 
       if ((buf->data[0] == 'V') && (buf->data[1] == ' '))
         {
-          /* Get the length of the key */
+          /* Get the length of the val */
           err = svn_cstring_strtoui64(&ui64, buf->data + 2,
                                       0, APR_SIZE_MAX, 10);
           if (err)
             return svn_error_create(SVN_ERR_MALFORMED_FILE, err,
-                                    _("Serialized hash malformed"));
+                                    _("Serialized hash malformed value 
length"));
           entry->vallen = (apr_size_t)ui64;
 
           entry->val = apr_palloc(pool, entry->vallen + 1);
@@ -169,7 +172,7 @@ svn_hash__read_entry(svn_hash__entry_t *
           SVN_ERR(svn_stream_read_full(stream, &c, &len));
           if (c != '\n')
             return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                    _("Serialized hash malformed"));
+                                    _("Serialized hash malformed value data"));
         }
       else
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
@@ -183,7 +186,7 @@ svn_hash__read_entry(svn_hash__entry_t *
                                   0, APR_SIZE_MAX, 10);
       if (err)
         return svn_error_create(SVN_ERR_MALFORMED_FILE, err,
-                                _("Serialized hash malformed"));
+                                _("Serialized hash malformed key length"));
       entry->keylen = (apr_size_t)ui64;
 
       /* Now read that much into a buffer. */
@@ -196,7 +199,7 @@ svn_hash__read_entry(svn_hash__entry_t *
       SVN_ERR(svn_stream_read_full(stream, &c, &len));
       if (c != '\n')
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                _("Serialized hash malformed"));
+                                _("Serialized hash malformed key data"));
 
       /* Remove this hash entry. */
       entry->vallen = 0;
@@ -560,6 +563,20 @@ svn_hash_from_cstring_keys(apr_hash_t **
 }
 
 
+void *
+svn_hash__gets(apr_hash_t *ht, const char *key)
+{
+  return apr_hash_get(ht, key, APR_HASH_KEY_STRING);
+}
+
+
+void
+svn_hash__sets(apr_hash_t *ht, const char *key, const void *val)
+{
+  apr_hash_set(ht, key, APR_HASH_KEY_STRING, val);
+}
+
+
 
 /*** Specialized getter APIs ***/
 
@@ -597,14 +614,14 @@ svn_hash__get_bool(apr_hash_t *hash, con
 
 /*** Optimized hash function ***/
 
-/* apr_hashfunc_t optimized for the key that we use in SVN: paths and 
+/* apr_hashfunc_t optimized for the key that we use in SVN: paths and
  * property names.  Its primary goal is speed for keys of known length.
- * 
+ *
  * Since strings tend to spawn large value spaces (usually differ in many
  * bits with differences spanning a larger section of the key), we can be
  * quite sloppy extracting a hash value.  The more keys there are in a
  * hash container, the more bits of the value returned by this function
- * will be used.  For a small number of string keys, choosing bits from any 
+ * will be used.  For a small number of string keys, choosing bits from any
  * any fix location close to the tail of those keys would usually be good
  * enough to prevent high collision rates.
  */

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/io.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/io.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/io.c Sun Jun 14 
20:58:10 2015
@@ -1002,10 +1002,9 @@ svn_io_copy_perms(const char *src,
           svn_error_clear(err);
         else
           {
-            const char *message;
-            message = apr_psprintf(pool, _("Can't set permissions on '%s'"),
-                                   svn_dirent_local_style(dst, pool));
-            return svn_error_quick_wrap(err, message);
+            return svn_error_quick_wrapf(
+                     err, _("Can't set permissions on '%s'"),
+                     svn_dirent_local_style(dst, pool));
           }
       }
   }
@@ -1192,7 +1191,7 @@ svn_error_t *
 svn_io_file_create_bytes(const char *file,
                          const void *contents,
                          apr_size_t length,
-                         apr_pool_t *pool)
+                         apr_pool_t *scratch_pool)
 {
   apr_file_t *f;
   apr_size_t written;
@@ -1201,13 +1200,14 @@ svn_io_file_create_bytes(const char *fil
   SVN_ERR(svn_io_file_open(&f, file,
                            (APR_WRITE | APR_CREATE | APR_EXCL),
                            APR_OS_DEFAULT,
-                           pool));
+                           scratch_pool));
   if (length)
-    err = svn_io_file_write_full(f, contents, length, &written, pool);
+    err = svn_io_file_write_full(f, contents, length, &written,
+                                 scratch_pool);
 
   err = svn_error_compose_create(
                     err,
-                    svn_io_file_close(f, pool));
+                    svn_io_file_close(f, scratch_pool));
 
   if (err)
     {
@@ -1217,7 +1217,7 @@ svn_io_file_create_bytes(const char *fil
       return svn_error_trace(
                 svn_error_compose_create(
                     err,
-                    svn_io_remove_file2(file, TRUE, pool)));
+                    svn_io_remove_file2(file, TRUE, scratch_pool)));
     }
 
   return SVN_NO_ERROR;
@@ -1236,9 +1236,10 @@ svn_io_file_create(const char *file,
 
 svn_error_t *
 svn_io_file_create_empty(const char *file,
-                         apr_pool_t *pool)
+                         apr_pool_t *scratch_pool)
 {
-  return svn_error_trace(svn_io_file_create_bytes(file, NULL, 0, pool));
+  return svn_error_trace(svn_io_file_create_bytes(file, NULL, 0,
+                                                  scratch_pool));
 }
 
 svn_error_t *
@@ -1855,7 +1856,7 @@ io_win_file_attrs_set(const char *fname,
                                   _("Can't set attributes of file '%s'"),
                                   svn_dirent_local_style(fname, pool));
 
-    return SVN_NO_ERROR;;
+    return SVN_NO_ERROR;
 }
 
 static svn_error_t *win_init_dynamic_imports(void *baton, apr_pool_t *pool)
@@ -2387,7 +2388,7 @@ stringbuf_from_aprfile(svn_stringbuf_t *
                                          res_initial_len, &res->len,
                                          &eof, pool));
           res->data[res->len] = 0;
-          
+
           *result = res;
           return SVN_NO_ERROR;
         }
@@ -2566,7 +2567,7 @@ svn_io_remove_dir2(const char *path, svn
      If we need to bail out, do so early. */
 
   if (cancel_func)
-    SVN_ERR((*cancel_func)(cancel_baton));
+    SVN_ERR(cancel_func(cancel_baton));
 
   subpool = svn_pool_create(pool);
 
@@ -2599,7 +2600,7 @@ svn_io_remove_dir2(const char *path, svn
       else
         {
           if (cancel_func)
-            SVN_ERR((*cancel_func)(cancel_baton));
+            SVN_ERR(cancel_func(cancel_baton));
 
           err = svn_io_remove_file2(fullpath, FALSE, subpool);
           if (err)
@@ -3581,6 +3582,16 @@ svn_io_file_info_get(apr_finfo_t *finfo,
              pool);
 }
 
+svn_error_t *
+svn_io_file_size_get(svn_filesize_t *filesize_p, apr_file_t *file,
+                     apr_pool_t *pool)
+{
+  apr_finfo_t finfo;
+  SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_SIZE, file, pool));
+
+  *filesize_p = finfo.size;
+  return SVN_NO_ERROR;
+}
 
 svn_error_t *
 svn_io_file_read(apr_file_t *file, void *buf,
@@ -3634,7 +3645,7 @@ svn_io_file_aligned_seek(apr_file_t *fil
                          apr_off_t block_size,
                          apr_off_t *buffer_start,
                          apr_off_t offset,
-                         apr_pool_t *pool)
+                         apr_pool_t *scratch_pool)
 {
   const apr_size_t apr_default_buffer_size = 4096;
   apr_size_t file_buffer_size = apr_default_buffer_size;
@@ -3684,7 +3695,7 @@ svn_io_file_aligned_seek(apr_file_t *fil
          buffer and no I/O will actually happen in the FILL_BUFFER
          section below.
        */
-      SVN_ERR(svn_io_file_seek(file, APR_CUR, &current, pool));
+      SVN_ERR(svn_io_file_seek(file, APR_CUR, &current, scratch_pool));
       fill_buffer = aligned_offset + file_buffer_size <= current
                  || current <= aligned_offset;
     }
@@ -3695,7 +3706,8 @@ svn_io_file_aligned_seek(apr_file_t *fil
       apr_status_t status;
 
       /* seek to the start of the block and cause APR to read 1 block */
-      SVN_ERR(svn_io_file_seek(file, APR_SET, &aligned_offset, pool));
+      SVN_ERR(svn_io_file_seek(file, APR_SET, &aligned_offset,
+                               scratch_pool));
       status = apr_file_getc(&dummy, file);
 
       /* read may fail if we seek to or behind EOF.  That's ok then. */
@@ -3703,17 +3715,17 @@ svn_io_file_aligned_seek(apr_file_t *fil
         return do_io_file_wrapper_cleanup(file, status,
                                           N_("Can't read file '%s'"),
                                           N_("Can't read stream"),
-                                          pool);
+                                          scratch_pool);
     }
 
   /* finally, seek to the OFFSET the caller wants */
   desired_offset = offset;
-  SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, pool));
+  SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, scratch_pool));
   if (desired_offset != offset)
     return do_io_file_wrapper_cleanup(file, APR_EOF,
                                       N_("Can't seek in file '%s'"),
                                       N_("Can't seek in stream"),
-                                      pool);
+                                      scratch_pool);
 
   /* return the buffer start that we (probably) enforced */
   if (buffer_start)
@@ -3866,11 +3878,10 @@ svn_io_write_atomic(const char *final_pa
                                                       scratch_pool));
     }
 
-#ifdef __linux__
+#if SVN_ON_POSIX
   {
-    /* Linux has the unusual feature that fsync() on a file is not
-       enough to ensure that a file's directory entries have been
-       flushed to disk; you have to fsync the directory as well.
+    /* On POSIX, the file name is stored in the file's directory entry.
+       Hence, we need to fsync() that directory as well.
        On other operating systems, we'd only be asking for trouble
        by trying to open and fsync a directory. */
     apr_file_t *file;
@@ -4044,7 +4055,8 @@ svn_error_t *
 svn_io_file_move(const char *from_path, const char *to_path,
                  apr_pool_t *pool)
 {
-  svn_error_t *err = svn_io_file_rename(from_path, to_path, pool);
+  svn_error_t *err = svn_error_trace(svn_io_file_rename(from_path, to_path,
+                                                        pool));
 
   if (err && APR_STATUS_IS_EXDEV(err->apr_err))
     {
@@ -4057,24 +4069,27 @@ svn_io_file_move(const char *from_path,
                                        svn_io_file_del_none,
                                        pool, pool));
 
-      err = svn_io_copy_file(from_path, tmp_to_path, TRUE, pool);
+      err = svn_error_trace(svn_io_copy_file(from_path, tmp_to_path, TRUE,
+                                             pool));
       if (err)
         goto failed_tmp;
 
-      err = svn_io_file_rename(tmp_to_path, to_path, pool);
+      err = svn_error_trace(svn_io_file_rename(tmp_to_path, to_path, pool));
       if (err)
         goto failed_tmp;
 
-      err = svn_io_remove_file2(from_path, FALSE, pool);
+      err = svn_error_trace(svn_io_remove_file2(from_path, FALSE, pool));
       if (! err)
         return SVN_NO_ERROR;
 
-      svn_error_clear(svn_io_remove_file2(to_path, FALSE, pool));
-
-      return err;
+      return svn_error_compose_create(
+                  err,
+                  svn_error_trace(svn_io_remove_file2(to_path, FALSE, pool)));
 
     failed_tmp:
-      svn_error_clear(svn_io_remove_file2(tmp_to_path, FALSE, pool));
+      err = svn_error_compose_create(
+              err,
+              svn_error_trace(svn_io_remove_file2(tmp_to_path, FALSE, pool)));
     }
 
   return err;
@@ -5080,12 +5095,9 @@ svn_io_open_unique_file3(apr_file_t **fi
             svn_error_clear(err);
           else
             {
-              const char *message;
-              message = apr_psprintf(scratch_pool,
-                                     _("Can't set permissions on '%s'"),
-                                     svn_dirent_local_style(tempname,
-                                                            scratch_pool));
-              return svn_error_quick_wrap(err, message);
+              return svn_error_quick_wrapf(
+                       err, _("Can't set permissions on '%s'"),
+                       svn_dirent_local_style(tempname, scratch_pool));
             }
         }
     }

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/mergeinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/mergeinfo.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/mergeinfo.c Sun Jun 14 
20:58:10 2015
@@ -2306,8 +2306,7 @@ svn_rangelist_dup(const svn_rangelist_t
 svn_merge_range_t *
 svn_merge_range_dup(const svn_merge_range_t *range, apr_pool_t *pool)
 {
-  svn_merge_range_t *new_range = apr_palloc(pool, sizeof(*new_range));
-  memcpy(new_range, range, sizeof(*new_range));
+  svn_merge_range_t *new_range = apr_pmemdup(pool, range, sizeof(*new_range));
   return new_range;
 }
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/object_pool.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/object_pool.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/object_pool.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/object_pool.c Sun Jun 
14 20:58:10 2015
@@ -85,7 +85,7 @@ struct svn_object_pool__t
 
   /* the root pool owning this structure */
   apr_pool_t *pool;
-  
+
   /* extractor and updater for the user object wrappers */
   svn_object_pool__getter_t getter;
   svn_object_pool__setter_t setter;
@@ -171,7 +171,7 @@ static void
 add_object_ref(object_ref_t *object_ref,
               apr_pool_t *pool)
 {
-  /* Update ref counter. 
+  /* Update ref counter.
      Note that this is racy with object_ref_cleanup; see comment there. */
   if (svn_atomic_inc(&object_ref->ref_count) == 0)
     svn_atomic_dec(&object_ref->object_pool->unused_count);
@@ -275,7 +275,7 @@ insert(void **object,
       svn_atomic_inc(&object_pool->object_count);
 
       /* the new entry is *not* in use yet.
-       * add_object_ref will update counters again. 
+       * add_object_ref will update counters again.
        */
       svn_atomic_inc(&object_ref->object_pool->unused_count);
     }
@@ -345,7 +345,7 @@ svn_object_pool__create(svn_object_pool_
    */
   apr_pool_cleanup_register(pool, result, object_pool_cleanup,
                             apr_pool_cleanup_null);
-  
+
   *object_pool = result;
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/packed_data.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/packed_data.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/packed_data.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/packed_data.c Sun Jun 
14 20:58:10 2015
@@ -39,7 +39,7 @@ typedef struct packed_int_private_t
 {
   /* First sub-stream, if any.  NULL otherwise. */
   svn_packed__int_stream_t *first_substream;
-  
+
   /* Last sub-stream, if any.  NULL otherwise. */
   svn_packed__int_stream_t *last_substream;
 
@@ -66,7 +66,7 @@ typedef struct packed_int_private_t
 
   /* Deltify data before storing it in PACKED. */
   svn_boolean_t diff;
-  
+
   /* Numbers are likely to contain negative values with small absolutes.
      If TRUE, store the signed bit in LSB before encoding. */
   svn_boolean_t is_signed;
@@ -141,7 +141,7 @@ svn_packed__data_create_root(apr_pool_t
 {
   svn_packed__data_root_t *root = apr_pcalloc(pool, sizeof(*root));
   root->pool = pool;
-  
+
   return root;
 }
 
@@ -160,7 +160,7 @@ svn_packed__create_int_stream(svn_packed
   private_data->is_signed = signed_ints;
   private_data->is_last = TRUE;
   private_data->pool = root->pool;
- 
+
   stream->buffer_used = 0;
   stream->private_data = private_data;
 
@@ -561,10 +561,10 @@ write_stream_data(svn_stream_t *stream,
                   svn_stringbuf_t *uncompressed,
                   svn_stringbuf_t *compressed)
 {
-  SVN_ERR(svn__compress(uncompressed,
+  SVN_ERR(svn__compress(uncompressed->data, uncompressed->len,
                         compressed,
                         SVN_DELTA_COMPRESSION_LEVEL_DEFAULT));
-      
+
   SVN_ERR(write_stream_uint(stream, compressed->len));
   SVN_ERR(svn_stream_write(stream, compressed->data, &compressed->len));
 
@@ -587,7 +587,7 @@ svn_packed__data_write(svn_stream_t *str
     = svn_stringbuf_create_ensure(1024, scratch_pool);
   svn_stringbuf_t *uncompressed
     = svn_stringbuf_create_ensure(1024, scratch_pool);
-    
+
   /* write tree structure */
   svn_stringbuf_t *tree_struct
     = svn_stringbuf_create_ensure(127, scratch_pool);
@@ -613,7 +613,7 @@ svn_packed__data_write(svn_stream_t *str
       append_int_stream(int_stream, uncompressed);
       SVN_ERR(write_stream_data(stream, uncompressed, compressed));
     }
-  
+
   for (byte_stream = root->first_byte_stream;
        byte_stream;
        byte_stream = byte_stream->next)
@@ -849,7 +849,7 @@ svn_packed__data_fill_buffer(svn_packed_
   private_data->item_count -= end;
 }
 
-apr_uint64_t 
+apr_uint64_t
 svn_packed__get_uint(svn_packed__int_stream_t *stream)
 {
   if (stream->buffer_used == 0)
@@ -876,7 +876,7 @@ svn_packed__get_bytes(svn_packed__byte_s
 
   /* advance packed buffer */
   stream->packed->data += count;
-  stream->packed->len -= count; 
+  stream->packed->len -= count;
   stream->packed->blocksize -= count;
 
   *len = count;
@@ -963,7 +963,7 @@ read_stream_data(svn_stream_t *stream,
 {
   apr_uint64_t len;
   apr_size_t compressed_len;
-  
+
   SVN_ERR(read_stream_uint(stream, &len));
   compressed_len = (apr_size_t)len;
 
@@ -972,7 +972,8 @@ read_stream_data(svn_stream_t *stream,
   SVN_ERR(svn_stream_read_full(stream, compressed->data, &compressed->len));
   compressed->data[compressed_len] = '\0';
 
-  SVN_ERR(svn__decompress(compressed, uncompressed, uncompressed_len));
+  SVN_ERR(svn__decompress(compressed->data, compressed->len,
+                          uncompressed, uncompressed_len));
 
   return SVN_NO_ERROR;
 }
@@ -1033,11 +1034,11 @@ svn_packed__data_read(svn_packed__data_r
 {
   apr_uint64_t i;
   apr_uint64_t count;
-  
+
   svn_packed__int_stream_t *int_stream;
   svn_packed__byte_stream_t *byte_stream;
   svn_packed__data_root_t *root = svn_packed__data_create_root(result_pool);
-  
+
   svn_stringbuf_t *compressed
     = svn_stringbuf_create_ensure(1024, scratch_pool);
   svn_stringbuf_t *uncompressed
@@ -1052,7 +1053,7 @@ svn_packed__data_read(svn_packed__data_r
   tree_struct
     = svn_stringbuf_create_ensure((apr_size_t)tree_struct_size, scratch_pool);
   tree_struct->len = (apr_size_t)tree_struct_size;
-  
+
   SVN_ERR(svn_stream_read_full(stream, tree_struct->data, &tree_struct->len));
   tree_struct->data[tree_struct->len] = '\0';
 
@@ -1066,7 +1067,7 @@ svn_packed__data_read(svn_packed__data_r
 
   count = read_packed_uint(tree_struct);
   for (i = 0; i < count; ++i)
-    read_byte_stream_structure(tree_struct, 
+    read_byte_stream_structure(tree_struct,
                                create_bytes_stream_body(root),
                                root->first_int_stream);
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/pool.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/pool.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/pool.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/pool.c Sun Jun 14 
20:58:10 2015
@@ -26,12 +26,14 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include <apr.h>
+#include <apr_version.h>
 #include <apr_general.h>
 #include <apr_pools.h>
-#include <apr_thread_mutex.h>
 
 #include "svn_pools.h"
 
+#include "pools.h"
 
 #if APR_POOL_DEBUG
 /* file_line for the non-debug case. */
@@ -140,3 +142,24 @@ svn_pool_create_allocator(svn_boolean_t
 
   return allocator;
 }
+
+
+/*
+ * apr_pool_create_core_ex was introduced in APR 1.3.0, then
+ * deprecated and renamed to apr_pool_create_unmanaged_ex in 1.3.3.
+ * Since our minimum requirement is APR 1.3.0, one or the other of
+ * these functions will always be available.
+ */
+#if !APR_VERSION_AT_LEAST(1,3,3)
+#define apr_pool_create_unmanaged_ex apr_pool_create_core_ex
+#endif
+
+/* Private function that creates an unmanaged pool. */
+apr_pool_t *
+svn_pool__create_unmanaged(svn_boolean_t thread_safe)
+{
+  apr_pool_t *pool;
+  apr_pool_create_unmanaged_ex(&pool, abort_on_pool_failure,
+                               svn_pool_create_allocator(thread_safe));
+  return pool;
+}

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/prefix_string.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/prefix_string.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/prefix_string.c 
(original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/prefix_string.c Sun Jun 
14 20:58:10 2015
@@ -69,7 +69,7 @@ struct node_t
    * 0 for the root node.  Only then will key.prefix be NULL. */
   apr_uint32_t length;
 
-  /* Number of entries used in SUB_NODES. */ 
+  /* Number of entries used in SUB_NODES. */
   apr_uint32_t sub_node_count;
 
   /* The sub-nodes, ordered by first char.  node_t and svn_prefix_string__t
@@ -136,7 +136,7 @@ search_lower_bound(node_t **sub_nodes,
   /* Binary search for the lowest position at which to insert KEY. */
   while (lower <= upper)
     {
-      int current = lower + (upper - lower) / 2; 
+      int current = lower + (upper - lower) / 2;
 
       if ((unsigned char)sub_nodes[current]->key.data[0] < key)
         lower = current + 1;

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/properties.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/properties.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/properties.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/properties.c Sun Jun 14 
20:58:10 2015
@@ -131,7 +131,6 @@ svn_boolean_t
 svn_prop_has_svn_prop(const apr_hash_t *props, apr_pool_t *pool)
 {
   apr_hash_index_t *hi;
-  const void *prop_name;
 
   if (! props)
     return FALSE;
@@ -139,8 +138,9 @@ svn_prop_has_svn_prop(const apr_hash_t *
   for (hi = apr_hash_first(pool, (apr_hash_t *)props); hi;
        hi = apr_hash_next(hi))
     {
-      apr_hash_this(hi, &prop_name, NULL, NULL);
-      if (svn_prop_is_svn_prop((const char *) prop_name))
+      const char *prop_name = apr_hash_this_key(hi);
+
+      if (svn_prop_is_svn_prop(prop_name))
         return TRUE;
     }
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/sorts.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/sorts.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/sorts.c Sun Jun 14 
20:58:10 2015
@@ -268,10 +268,10 @@ svn_sort__array_lookup(const apr_array_h
           /* Intend to insert at a position inside the array, i.e. not
            * at one of the boundaries.  The predecessor must be smaller
            * and the current entry at IDX must be larger than KEY. */
-                 void *previous;
+          void *previous;
 
           *hint = idx;
-                 previous = array->elts + (idx-1) * array->elt_size;
+          previous = array->elts + (idx-1) * array->elt_size;
           result = array->elts + idx * array->elt_size;
           if (compare_func(previous, key) && !compare_func(result, key))
             return result;
@@ -484,7 +484,7 @@ svn_priority_queue__create(apr_array_hea
 
   for (i = elements->nelts / 2; i >= 0; --i)
     heap_bubble_up(queue, i);
-  
+
   return queue;
 }
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite.c Sun Jun 14 
20:58:10 2015
@@ -879,7 +879,7 @@ internal_open(svn_sqlite__db_t *db, cons
     /* Open the database. Note that a handle is returned, even when an error
        occurs (except for out-of-memory); thus, we can safely use it to
        extract an error message and construct an svn_error_t.  SQLite always
-       requires sqlite3_close() after sqlite3_open_v2() while Subversion 
+       requires sqlite3_close() after sqlite3_open_v2() while Subversion
        typically does not require close() after an open() that returns an
        error.  So we must ensure we close the handle if this function, or
        the caller svn_sqlite__open, returns an error to the application. */
@@ -1171,7 +1171,8 @@ svn_sqlite__open(svn_sqlite__db_t **db,
                  affects application(read: Subversion) performance/behavior. */
               "PRAGMA foreign_keys=OFF;"      /* SQLITE_DEFAULT_FOREIGN_KEYS*/
               "PRAGMA locking_mode = NORMAL;" /* SQLITE_DEFAULT_LOCKING_MODE */
-                            ),
+              "PRAGMA journal_mode = TRUNCATE;"
+              ),
                 *db);
 
 #if defined(SVN_DEBUG)
@@ -1306,7 +1307,7 @@ svn_sqlite__finish_transaction(svn_sqlit
       err2 = get_internal_statement(&stmt, db,
                                     STMT_INTERNAL_ROLLBACK_TRANSACTION);
       if (!err2)
-        err2 = svn_sqlite__step_done(stmt);
+        err2 = svn_error_trace(svn_sqlite__step_done(stmt));
 
       if (err2 && err2->apr_err == SVN_ERR_SQLITE_BUSY)
         {
@@ -1329,14 +1330,14 @@ svn_sqlite__finish_transaction(svn_sqlit
              help diagnosing the original error and help in finding where
              a reset statement is missing. */
 
-          err2 = reset_all_statements(db, err2);
+          err2 = svn_error_trace(reset_all_statements(db, err2));
           err2 = svn_error_compose_create(
-                      svn_sqlite__step_done(stmt),
+                      svn_error_trace(svn_sqlite__step_done(stmt)),
                       err2);
+
         }
 
-      return svn_error_compose_create(err,
-                                      err2);
+      return svn_error_compose_create(err, err2);
     }
 
   SVN_ERR(get_internal_statement(&stmt, db, STMT_INTERNAL_COMMIT_TRANSACTION));
@@ -1357,7 +1358,7 @@ svn_sqlite__finish_savepoint(svn_sqlite_
                                     STMT_INTERNAL_ROLLBACK_TO_SAVEPOINT_SVN);
 
       if (!err2)
-        err2 = svn_sqlite__step_done(stmt);
+        err2 = svn_error_trace(svn_sqlite__step_done(stmt));
 
       if (err2 && err2->apr_err == SVN_ERR_SQLITE_BUSY)
         {
@@ -1367,8 +1368,10 @@ svn_sqlite__finish_savepoint(svn_sqlite_
              ### See huge comment in svn_sqlite__finish_transaction for
                  further details */
 
-          err2 = reset_all_statements(db, err2);
-          err2 = svn_error_compose_create(svn_sqlite__step_done(stmt), err2);
+          err2 = svn_error_trace(reset_all_statements(db, err2));
+          err2 = svn_error_compose_create(
+                      svn_error_trace(svn_sqlite__step_done(stmt)),
+                      err2);
         }
 
       err = svn_error_compose_create(err, err2);
@@ -1376,9 +1379,9 @@ svn_sqlite__finish_savepoint(svn_sqlite_
                                     STMT_INTERNAL_RELEASE_SAVEPOINT_SVN);
 
       if (!err2)
-        err2 = svn_sqlite__step_done(stmt);
+        err2 = svn_error_trace(svn_sqlite__step_done(stmt));
 
-      return svn_error_trace(svn_error_compose_create(err, err2));
+      return svn_error_compose_create(err, err2);
     }
 
   SVN_ERR(get_internal_statement(&stmt, db,
@@ -1476,8 +1479,6 @@ struct function_wrapper_baton_t
 {
   svn_sqlite__func_t func;
   void *baton;
-
-  apr_pool_t *scratch_pool;
 };
 
 static void
@@ -1487,22 +1488,12 @@ wrapped_func(sqlite3_context *context,
 {
   struct function_wrapper_baton_t *fwb = sqlite3_user_data(context);
   svn_sqlite__context_t sctx;
-  svn_sqlite__value_t **local_vals =
-                            apr_palloc(fwb->scratch_pool,
-                                       sizeof(svn_sqlite__value_t *) * argc);
   svn_error_t *err;
-  int i;
+  void *void_values = values;
 
   sctx.context = context;
 
-  for (i = 0; i < argc; i++)
-    {
-      local_vals[i] = apr_palloc(fwb->scratch_pool, sizeof(*local_vals[i]));
-      local_vals[i]->value = values[i];
-    }
-
-  err = fwb->func(&sctx, argc, local_vals, fwb->scratch_pool);
-  svn_pool_clear(fwb->scratch_pool);
+  err = fwb->func(&sctx, argc, void_values, fwb->baton);
 
   if (err)
     {
@@ -1514,6 +1505,7 @@ wrapped_func(sqlite3_context *context,
     }
 }
 
+
 svn_error_t *
 svn_sqlite__create_scalar_function(svn_sqlite__db_t *db,
                                    const char *func_name,
@@ -1526,7 +1518,6 @@ svn_sqlite__create_scalar_function(svn_s
   struct function_wrapper_baton_t *fwb = apr_pcalloc(db->state_pool,
                                                      sizeof(*fwb));
 
-  fwb->scratch_pool = svn_pool_create(db->state_pool);
   fwb->func = func;
   fwb->baton = baton;
 
@@ -1544,13 +1535,15 @@ svn_sqlite__create_scalar_function(svn_s
 int
 svn_sqlite__value_type(svn_sqlite__value_t *val)
 {
-  return sqlite3_value_type(val->value);
+  void *v = val;
+  return sqlite3_value_type(v);
 }
 
 const char *
 svn_sqlite__value_text(svn_sqlite__value_t *val)
 {
-  return (const char *) sqlite3_value_text(val->value);
+  void *v = val;
+  return (const char *) sqlite3_value_text(v);
 }
 
 void

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite3wrapper.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite3wrapper.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite3wrapper.c 
(original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/sqlite3wrapper.c Sun 
Jun 14 20:58:10 2015
@@ -24,7 +24,7 @@
 
 /* Include sqlite3 inline, making all symbols private. */
 #ifdef SVN_SQLITE_INLINE
-#  define SQLITE_OMIT_DEPRECATED
+#  define SQLITE_OMIT_DEPRECATED 1
 #  define SQLITE_API static
 #  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
 #    pragma GCC diagnostic ignored "-Wunreachable-code"

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/stream.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/stream.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/stream.c Sun Jun 14 
20:58:10 2015
@@ -1443,13 +1443,14 @@ svn_error_t *
 svn_stringbuf_from_stream(svn_stringbuf_t **str,
                           svn_stream_t *stream,
                           apr_size_t len_hint,
-                          apr_pool_t *pool)
+                          apr_pool_t *result_pool)
 {
 #define MIN_READ_SIZE 64
 
   apr_size_t to_read = 0;
   svn_stringbuf_t *text
-    = svn_stringbuf_create_ensure(len_hint ? len_hint : MIN_READ_SIZE, pool);
+    = svn_stringbuf_create_ensure(len_hint ? len_hint : MIN_READ_SIZE,
+                                  result_pool);
 
   do
     {
@@ -2199,11 +2200,11 @@ svn_stream__install_stream(svn_stream_t
 
       apr_os_file_get(&hFile, ib->baton_apr.file);
 
-      SVN_ERR(svn_utf__win32_utf8_to_utf16(&w_final_abspath,
-                                           svn_dirent_local_style(
+      SVN_ERR(svn_io__utf8_to_unicode_longpath(&w_final_abspath,
+                                               svn_dirent_local_style(
                                                           final_abspath,
                                                           scratch_pool),
-                                           NULL, scratch_pool));
+                                               scratch_pool));
       path_len = wcslen(w_final_abspath);
       rename_size = sizeof(*rename_info) + sizeof(WCHAR) * path_len;
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/string.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/string.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/string.c Sun Jun 14 
20:58:10 2015
@@ -1300,7 +1300,7 @@ svn__base36toui64(const char **next, con
 }
 
 
-unsigned int
+apr_size_t
 svn_cstring__similarity(const char *stra, const char *strb,
                         svn_membuf_t *buffer, apr_size_t *rlcs)
 {
@@ -1312,7 +1312,7 @@ svn_cstring__similarity(const char *stra
   return svn_string__similarity(&stringa, &stringb, buffer, rlcs);
 }
 
-unsigned int
+apr_size_t
 svn_string__similarity(const svn_string_t *stringa,
                        const svn_string_t *stringb,
                        svn_membuf_t *buffer, apr_size_t *rlcs)
@@ -1401,9 +1401,9 @@ svn_string__similarity(const svn_string_
 
   /* Return similarity ratio rounded to 4 significant digits */
   if (total)
-    return(unsigned int)((2000 * lcs + total/2) / total);
+    return ((2 * SVN_STRING__SIM_RANGE_MAX * lcs + total/2) / total);
   else
-    return 1000;
+    return SVN_STRING__SIM_RANGE_MAX;
 }
 
 apr_size_t

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/subst.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/subst.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/subst.c Sun Jun 14 
20:58:10 2015
@@ -1150,7 +1150,7 @@ translate_chunk(svn_stream_t *dst,
                   const char *start = p + len;
                   const char *eol
                     = svn_eol__find_eol_start((char *)start, end - start);
-                  
+
                   /* EOL will be NULL if we did not find a line ending */
                   len += (eol ? eol : end) - start;
                 }
@@ -1972,7 +1972,7 @@ svn_subst_translate_string2(svn_string_t
       return SVN_NO_ERROR;
     }
 
-  if (encoding && !strcmp(encoding, "UTF-8")) 
+  if (encoding && !strcmp(encoding, "UTF-8"))
     {
       val_utf8 = value->data;
     }

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/sysinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/sysinfo.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/sysinfo.c Sun Jun 14 
20:58:10 2015
@@ -449,7 +449,7 @@ systemd_release(apr_pool_t *pool)
       if (!strncmp(line->data, "PRETTY_NAME=", 12))
         {
           svn_stringbuf_t *release_name;
-          
+
           /* The value may or may not be enclosed by double quotes.  We don't
            * attempt to strip them. */
           release_name = svn_stringbuf_create(line->data + 12, pool);
@@ -1032,7 +1032,7 @@ system_version_plist(svn_boolean_t *serv
   write_stream = svn_stream_create(&resource, pool);
   svn_stream_set_write(write_stream, write_to_cfmutabledata);
   err = svn_stream_copy3(read_stream, write_stream, NULL, NULL, pool);
-  if (err) 
+  if (err)
     {
       svn_error_clear(err);
       return NULL;

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/types.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/types.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/types.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/types.c Sun Jun 14 
20:58:10 2015
@@ -62,14 +62,14 @@ svn_revnum_parse(svn_revnum_t *rev,
         return svn_error_createf
                   (SVN_ERR_REVNUM_PARSE_FAILURE, NULL,
                   _("Revision number longer than 10 digits '%s'"), str);
-        
+
       /* we support 32 bit revision numbers only. check for overflows */
       if (*str > '2' || (apr_uint32_t)result > APR_INT32_MAX)
         return svn_error_createf
                   (SVN_ERR_REVNUM_PARSE_FAILURE, NULL,
                   _("Revision number too large '%s'"), str);
     }
-  
+
   if (endptr)
     *endptr = end;
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_subr/utf.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/utf.c?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/utf.c Sun Jun 14 
20:58:10 2015
@@ -257,7 +257,7 @@ xlate_alloc_handle(xlate_handle_node_t *
          later.  APR_STRERR will be in the local encoding, not in UTF-8, 
though.
        */
       svn_strerror(apr_err, apr_strerr, sizeof(apr_strerr));
-      return svn_error_createf(SVN_ERR_PLUGIN_LOAD_FAILURE, 
+      return svn_error_createf(SVN_ERR_PLUGIN_LOAD_FAILURE,
                                svn_error_create(apr_err, NULL, apr_strerr),
                                "%s%s", name, errstr);
     }

Modified: 
subversion/branches/fsx-1.10/subversion/libsvn_subr/utf8proc/utf8proc.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_subr/utf8proc/utf8proc.h?rev=1685464&r1=1685463&r2=1685464&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_subr/utf8proc/utf8proc.h 
(original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_subr/utf8proc/utf8proc.h Sun 
Jun 14 20:58:10 2015
@@ -71,18 +71,26 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #ifdef _MSC_VER
+# if _MSC_VER >= 1600
+#   include <stdint.h>
+# else
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
 typedef short int16_t;
 typedef unsigned short uint16_t;
 typedef int int32_t;
-#ifdef _WIN64
-#define ssize_t __int64
-#else
-#define ssize_t int
-#endif
+# endif
+# if _MSC_VER >= 1800
+#   include <stdbool.h>
+# else
 typedef unsigned char bool;
 enum {false, true};
+# endif
+# ifdef _WIN64
+#   define ssize_t __int64
+# else
+#   define ssize_t int
+# endif
 #elif defined(HAVE_STDBOOL_H) && defined(HAVE_INTTYPES_H)
 #include <stdbool.h>
 #include <inttypes.h>


Reply via email to