You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2008/04/26 00:34:22 UTC

svn commit: r651724 - /apr/apr/branches/0.9.x/file_io/unix/copy.c

Author: bojan
Date: Fri Apr 25 15:34:21 2008
New Revision: 651724

URL: http://svn.apache.org/viewvc?rev=651724&view=rev
Log:
Backport r651721 from the trunk
Rework possibly non-portable constant expression

Modified:
    apr/apr/branches/0.9.x/file_io/unix/copy.c

Modified: apr/apr/branches/0.9.x/file_io/unix/copy.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/file_io/unix/copy.c?rev=651724&r1=651723&r2=651724&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/unix/copy.c (original)
+++ apr/apr/branches/0.9.x/file_io/unix/copy.c Fri Apr 25 15:34:21 2008
@@ -63,10 +63,15 @@
         return status;
     }
 
+#if BUFSIZ > APR_FILE_DEFAULT_BUFSIZE
+#define COPY_BUFSIZ BUFSIZ
+#else
+#define COPY_BUFSIZ APR_FILE_DEFAULT_BUFSIZE
+#endif
+
     /* Copy bytes till the cows come home. */
     while (1) {
-        char buf[BUFSIZ > APR_FILE_DEFAULT_BUFSIZE ? BUFSIZ
-                                                   : APR_FILE_DEFAULT_BUFSIZE];
+        char buf[COPY_BUFSIZ];
         apr_size_t bytes_this_time = sizeof(buf);
         apr_status_t read_err;
         apr_status_t write_err;