summaryrefslogtreecommitdiff
path: root/file_io/netware
diff options
context:
space:
mode:
authorBradley Nicholes <bnicholes@apache.org>2002-10-09 15:40:28 +0000
committerBradley Nicholes <bnicholes@apache.org>2002-10-09 15:40:28 +0000
commitb213568528676eb2319087754acc7e9720c4837e (patch)
tree099bfd5a2cd35a562340d8d0adedf7b2cecfb64a /file_io/netware
parentbf4b809bf48aebfb9c2b2c45c6693a4cae6e1fc9 (diff)
downloadapr-b213568528676eb2319087754acc7e9720c4837e.tar.gz
Implemented the apr_os_pipe_put() API on NetWare
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/netware')
-rw-r--r--file_io/netware/pipe.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/file_io/netware/pipe.c b/file_io/netware/pipe.c
index 47c864894..7b8fca77a 100644
--- a/file_io/netware/pipe.c
+++ b/file_io/netware/pipe.c
@@ -58,6 +58,7 @@
#include "fileio.h"
#include "apr_strings.h"
+#include "apr_portable.h"
static apr_status_t pipeblock(apr_file_t *thepipe)
{
@@ -134,6 +135,28 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_int
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)
{
int filedes[2];