apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r651704 - in /apr/apr/trunk: file_io/unix/copy.c include/arch/netware/apr_arch_file_io.h include/arch/os2/apr_arch_file_io.h include/arch/unix/apr_arch_file_io.h include/arch/win32/apr_arch_file_io.h
Date Fri, 25 Apr 2008 21:52:38 GMT
Author: bojan
Date: Fri Apr 25 14:52:36 2008
New Revision: 651704

URL: http://svn.apache.org/viewvc?rev=651704&view=rev
Log:
Remove APR_BUFSIZ definition, as it would only be used in one place
Put buffer sizing directly into the only function that uses it.

Modified:
    apr/apr/trunk/file_io/unix/copy.c
    apr/apr/trunk/include/arch/netware/apr_arch_file_io.h
    apr/apr/trunk/include/arch/os2/apr_arch_file_io.h
    apr/apr/trunk/include/arch/unix/apr_arch_file_io.h
    apr/apr/trunk/include/arch/win32/apr_arch_file_io.h

Modified: apr/apr/trunk/file_io/unix/copy.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/copy.c?rev=651704&r1=651703&r2=651704&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/copy.c (original)
+++ apr/apr/trunk/file_io/unix/copy.c Fri Apr 25 14:52:36 2008
@@ -54,7 +54,8 @@
 
     /* Copy bytes till the cows come home. */
     while (1) {
-        char buf[APR_BUFSIZ];
+        char buf[BUFSIZ > APR_FILE_DEFAULT_BUFSIZE ? BUFSIZ
+                                                   : APR_FILE_DEFAULT_BUFSIZE];
         apr_size_t bytes_this_time = sizeof(buf);
         apr_status_t read_err;
         apr_status_t write_err;

Modified: apr/apr/trunk/include/arch/netware/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/netware/apr_arch_file_io.h?rev=651704&r1=651703&r2=651704&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/netware/apr_arch_file_io.h (original)
+++ apr/apr/trunk/include/arch/netware/apr_arch_file_io.h Fri Apr 25 14:52:36 2008
@@ -73,12 +73,6 @@
 /* For backwards compat */
 #define APR_FILE_BUFSIZE APR_FILE_DEFAULT_BUFSIZE
 
-#if BUFSIZ > APR_FILE_DEFAULT_BUFSIZE
-#define APR_BUFSIZ BUFSIZ
-#else
-#define APR_BUFSIZ APR_FILE_DEFAULT_BUFSIZE
-#endif
-
 #if APR_HAS_THREADS
 #define file_lock(f)   do { \
                            if ((f)->thlock) \

Modified: apr/apr/trunk/include/arch/os2/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/os2/apr_arch_file_io.h?rev=651704&r1=651703&r2=651704&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/os2/apr_arch_file_io.h (original)
+++ apr/apr/trunk/include/arch/os2/apr_arch_file_io.h Fri Apr 25 14:52:36 2008
@@ -34,12 +34,6 @@
 #define APR_FILE_DEFAULT_BUFSIZE 4096
 #define APR_FILE_BUFSIZE APR_FILE_DEFAULT_BUFSIZE
 
-#if BUFSIZ > APR_FILE_DEFAULT_BUFSIZE
-#define APR_BUFSIZ BUFSIZ
-#else
-#define APR_BUFSIZ APR_FILE_DEFAULT_BUFSIZE
-#endif
-
 struct apr_file_t {
     apr_pool_t *pool;
     HFILE filedes;

Modified: apr/apr/trunk/include/arch/unix/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_file_io.h?rev=651704&r1=651703&r2=651704&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/unix/apr_arch_file_io.h (original)
+++ apr/apr/trunk/include/arch/unix/apr_arch_file_io.h Fri Apr 25 14:52:36 2008
@@ -90,12 +90,6 @@
 /* For backwards-compat */
 #define APR_FILE_BUFSIZE  APR_FILE_DEFAULT_BUFSIZE
 
-#if BUFSIZ > APR_FILE_DEFAULT_BUFSIZE
-#define APR_BUFSIZ BUFSIZ
-#else
-#define APR_BUFSIZ APR_FILE_DEFAULT_BUFSIZE
-#endif
-
 struct apr_file_t {
     apr_pool_t *pool;
     int filedes;

Modified: apr/apr/trunk/include/arch/win32/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/win32/apr_arch_file_io.h?rev=651704&r1=651703&r2=651704&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/win32/apr_arch_file_io.h (original)
+++ apr/apr/trunk/include/arch/win32/apr_arch_file_io.h Fri Apr 25 14:52:36 2008
@@ -86,12 +86,6 @@
 /* For backwards-compat */
 #define APR_FILE_BUFSIZE APR_FILE_DEFAULT_BUFSIZE
 
-#if BUFSIZ > APR_FILE_DEFAULT_BUFSIZE
-#define APR_BUFSIZ BUFSIZ
-#else
-#define APR_BUFSIZ APR_FILE_DEFAULT_BUFSIZE
-#endif
-
 /* obscure ommissions from msvc's sys/stat.h */
 #ifdef _MSC_VER
 #define S_IFIFO        _S_IFIFO /* pipe */



Mime
View raw message