apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/file_io/netware pipe.c
Date Wed, 09 Oct 2002 15:40:28 GMT
bnicholes    2002/10/09 08:40:28

  Modified:    file_io/netware pipe.c
  Log:
  Implemented the apr_os_pipe_put() API on NetWare
  
  Revision  Changes    Path
  1.13      +23 -0     apr/file_io/netware/pipe.c
  
  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/netware/pipe.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- pipe.c	3 Jun 2002 18:52:45 -0000	1.12
  +++ pipe.c	9 Oct 2002 15:40:28 -0000	1.13
  @@ -58,6 +58,7 @@
   
   #include "fileio.h"
   #include "apr_strings.h"
  +#include "apr_portable.h"
   
   static apr_status_t pipeblock(apr_file_t *thepipe)
   {
  @@ -132,6 +133,28 @@
           return APR_SUCCESS;
       }
       return APR_EINVAL;
  +}
  +
  +APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
  +                                          apr_os_file_t *thefile,
  +                                          apr_pool_t *pool)
  +{
  +    int *dafile = thefile;
  +    
  +    (*file) = apr_pcalloc(pool, sizeof(apr_file_t));
  +    (*file)->pool = pool;
  +    (*file)->eof_hit = 0;
  +    (*file)->is_pipe = 1;
  +    (*file)->blocking = BLK_UNKNOWN; /* app needs to make a timeout call */
  +    (*file)->timeout = -1;
  +    (*file)->ungetchar = -1; /* no char avail */
  +    (*file)->filedes = *dafile;
  +    (*file)->flags = 0;
  +    (*file)->buffered = 0;
  +#if APR_HAS_THREADS
  +    (*file)->thlock = NULL;
  +#endif
  +    return APR_SUCCESS;
   }
   
   APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t
*pool)
  
  
  

Mime
View raw message