apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r917819 - in /apr/apr/trunk: CHANGES file_io/unix/open.c include/apr_file_io.h
Date Tue, 02 Mar 2010 00:17:18 GMT
Author: minfrin
Date: Tue Mar  2 00:17:18 2010
New Revision: 917819

URL: http://svn.apache.org/viewvc?rev=917819&view=rev
Log:
Enable platform specific support for the opening of a file or
pipe in non blocking module through the APR_FOPEN_NONBLOCK flag.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/file_io/unix/open.c
    apr/apr/trunk/include/apr_file_io.h

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=917819&r1=917818&r2=917819&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Tue Mar  2 00:17:18 2010
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) Enable platform specific support for the opening of a file or
+     pipe in non blocking module through the APR_FOPEN_NONBLOCK flag.
+     [Graham Leggett]
+
   *) Enable per-connection LDAP client certificates for
      openldap by requesting a new SSL context. [Eric Covener]
 

Modified: apr/apr/trunk/file_io/unix/open.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/open.c?rev=917819&r1=917818&r2=917819&view=diff
==============================================================================
--- apr/apr/trunk/file_io/unix/open.c (original)
+++ apr/apr/trunk/file_io/unix/open.c Tue Mar  2 00:17:18 2010
@@ -136,6 +136,12 @@
     }
 #endif
 
+#ifdef O_NONBLOCK
+    if (flag & APR_FOPEN_NONBLOCK) {
+        oflags |= O_NONBLOCK;
+    }
+#endif
+
 #ifdef O_CLOEXEC
     /* Introduced in Linux 2.6.23. Silently ignored on earlier Linux kernels.
      */

Modified: apr/apr/trunk/include/apr_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_file_io.h?rev=917819&r1=917818&r2=917819&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_file_io.h (original)
+++ apr/apr/trunk/include/apr_file_io.h Tue Mar  2 00:17:18 2010
@@ -85,7 +85,11 @@
 #define APR_FOPEN_ROTATING  0x10000 /**< Do file file rotation checking */
  
 #define APR_FOPEN_MANUAL_ROTATE  0x20000 /**< Enable Manual rotation */
-  
+
+#define APR_FOPEN_NONBLOCK    0x40000 /**< Platform dependent flag to enable
+                                       * non blocking file io */
+
+ 
 
 /* backcompat */
 #define APR_READ             APR_FOPEN_READ       /**< @deprecated @see APR_FOPEN_READ
*/



Mime
View raw message