apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r748080 - in /apr/apr/trunk: file_io/win32/filedup.c file_io/win32/open.c file_io/win32/pipe.c include/arch/win32/apr_arch_file_io.h
Date Thu, 26 Feb 2009 11:04:10 GMT
Author: mturk
Date: Thu Feb 26 11:04:10 2009
New Revision: 748080

URL: http://svn.apache.org/viewvc?rev=748080&view=rev
Log:
On windows files != sockets, so do not

Modified:
    apr/apr/trunk/file_io/win32/filedup.c
    apr/apr/trunk/file_io/win32/open.c
    apr/apr/trunk/file_io/win32/pipe.c
    apr/apr/trunk/include/arch/win32/apr_arch_file_io.h

Modified: apr/apr/trunk/file_io/win32/filedup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/filedup.c?rev=748080&r1=748079&r2=748080&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/filedup.c (original)
+++ apr/apr/trunk/file_io/win32/filedup.c Thu Feb 26 11:04:10 2009
@@ -57,10 +57,11 @@
     apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file), file_cleanup,
                         apr_pool_cleanup_null);
 
+#if APR_FILES_AS_SOCKETS
     /* Create a pollset with room for one descriptor. */
     /* ### check return codes */
     (void) apr_pollset_create(&(*new_file)->pollset, 1, p, 0);
-
+#endif
     return APR_SUCCESS;
 #endif /* !defined(_WIN32_WCE) */
 }
@@ -218,9 +219,10 @@
     apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
                           file_cleanup);
 
+#if APR_FILES_AS_SOCKETS
     /* Create a pollset with room for one descriptor. */
     /* ### check return codes */
     (void) apr_pollset_create(&(*new_file)->pollset, 1, p, 0);
-
+#endif
     return APR_SUCCESS;
 }

Modified: apr/apr/trunk/file_io/win32/open.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/open.c?rev=748080&r1=748079&r2=748080&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/open.c (original)
+++ apr/apr/trunk/file_io/win32/open.c Thu Feb 26 11:04:10 2009
@@ -477,10 +477,11 @@
         /* This feature is not supported on this platform. */
         (*new)->flags &= ~APR_FOPEN_SPARSE;
 
+#if APR_FILES_AS_SOCKETS
     /* Create a pollset with room for one descriptor. */
     /* ### check return codes */
     (void) apr_pollset_create(&(*new)->pollset, 1, pool, 0);
-
+#endif
     if (!(flag & APR_FILE_NOCLEANUP)) {
         apr_pool_cleanup_register((*new)->pool, (void *)(*new), file_cleanup,
                                   apr_pool_cleanup_null);
@@ -649,10 +650,11 @@
         }
     }
 
+#if APR_FILES_AS_SOCKETS
     /* Create a pollset with room for one descriptor. */
     /* ### check return codes */
     (void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
-
+#endif
     /* Should we be testing if thefile is a handle to 
      * a PIPE and set up the mechanics appropriately?
      *

Modified: apr/apr/trunk/file_io/win32/pipe.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/pipe.c?rev=748080&r1=748079&r2=748080&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/pipe.c (original)
+++ apr/apr/trunk/file_io/win32/pipe.c Thu Feb 26 11:04:10 2009
@@ -105,8 +105,9 @@
     (*in)->dataRead = 0;
     (*in)->direction = 0;
     (*in)->pOverlapped = NULL;
+#if APR_FILES_AS_SOCKETS
     (void) apr_pollset_create(&(*in)->pollset, 1, p, 0);
-
+#endif
     (*out) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
     (*out)->pool = p;
     (*out)->fname = NULL;
@@ -119,8 +120,9 @@
     (*out)->dataRead = 0;
     (*out)->direction = 0;
     (*out)->pOverlapped = NULL;
+#if APR_FILES_AS_SOCKETS
     (void) apr_pollset_create(&(*out)->pollset, 1, p, 0);
-
+#endif
     if (apr_os_level >= APR_WIN_NT) {
         /* Create the read end of the pipe */
         dwOpenMode = PIPE_ACCESS_INBOUND;
@@ -208,8 +210,9 @@
     (*file)->timeout = -1;
     (*file)->ungetchar = -1;
     (*file)->filehand = *thefile;
+#if APR_FILES_AS_SOCKETS
     (void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
-
+#endif
     if (register_cleanup) {
         apr_pool_cleanup_register(pool, *file, file_cleanup,
                                   apr_pool_cleanup_null);

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=748080&r1=748079&r2=748080&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 Thu Feb 26 11:04:10 2009
@@ -184,9 +184,10 @@
     apr_off_t filePtr;         // position in file of handle
     apr_thread_mutex_t *mutex; // mutex semaphore, must be owned to access the above fields
 
+#if APR_FILES_AS_SOCKETS
     /* if there is a timeout set, then this pollset is used */
     apr_pollset_t *pollset;
-
+#endif
     /* Pipe specific info */    
 };
 



Mime
View raw message