subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1425807 - /subversion/trunk/tools/server-side/fsfs-stats.c
Date Wed, 26 Dec 2012 01:22:45 GMT
Author: stefan2
Date: Wed Dec 26 01:22:44 2012
New Revision: 1425807

URL: http://svn.apache.org/viewvc?rev=1425807&view=rev
Log:
Follow-up to r1425762: fix build for pre-1.3 APR

* tools/server-side/fsfs-stats.c
  (get_content): user larger file buffer sizes only when supported by APR

Modified:
    subversion/trunk/tools/server-side/fsfs-stats.c

Modified: subversion/trunk/tools/server-side/fsfs-stats.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/fsfs-stats.c?rev=1425807&r1=1425806&r2=1425807&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/fsfs-stats.c (original)
+++ subversion/trunk/tools/server-side/fsfs-stats.c Wed Dec 26 01:22:44 2012
@@ -270,6 +270,7 @@ get_content(svn_stringbuf_t **content,
   *content = svn_stringbuf_create_ensure(len, pool);
   (*content)->len = len;
 
+#if APR_VERSION_AT_LEAST(1,3,0)
   /* for better efficiency use larger buffers on large reads */
   if (   (len >= large_buffer_size)
       && (apr_file_buffer_size_get(file) < large_buffer_size))
@@ -277,7 +278,8 @@ get_content(svn_stringbuf_t **content,
                         apr_palloc(apr_file_pool_get(file),
                                    large_buffer_size),
                         large_buffer_size);
-
+#endif
+    
   SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, pool));
   SVN_ERR(svn_io_file_read_full2(file, (*content)->data, len,
                                  NULL, NULL, pool));



Mime
View raw message