summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2002-10-09 15:40:28 +0000
committerbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2002-10-09 15:40:28 +0000
commit93530af8d5d6ff2b913de630358b63383d35582e (patch)
tree099bfd5a2cd35a562340d8d0adedf7b2cecfb64a /file_io
parent46fdb239c72345b0068f5ce79c694cfeb1f8bf28 (diff)
downloadlibapr-93530af8d5d6ff2b913de630358b63383d35582e.tar.gz
Implemented the apr_os_pipe_put() API on NetWare
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-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];