summaryrefslogtreecommitdiff
path: root/file_io/os2
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2010-03-30 11:16:48 +0000
committerBrian Havard <bjh@apache.org>2010-03-30 11:16:48 +0000
commitf10c56a6ec6bb29a9e05a21d6cc870cab6f3ee1a (patch)
treec07b75275fd7e8642be80cd90b41c5644c280b9d /file_io/os2
parent0741e97ea52617ce5cd5d8f3257d740e83cc6fd6 (diff)
downloadapr-f10c56a6ec6bb29a9e05a21d6cc870cab6f3ee1a.tar.gz
OS/2: fix apr_file_putc() to use the buffer if there is one.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@929081 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2')
-rw-r--r--file_io/os2/readwrite.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index 5dc0f9ad6..921911284 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -239,20 +239,9 @@ APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iove
APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
{
- ULONG rc;
- ULONG byteswritten;
-
- if (!thefile->isopen) {
- return APR_EBADF;
- }
+ apr_size_t nbytes = 1;
- rc = DosWrite(thefile->filedes, &ch, 1, &byteswritten);
-
- if (rc) {
- return APR_FROM_OS_ERROR(rc);
- }
-
- return APR_SUCCESS;
+ return apr_file_write(thefile, &ch, &nbytes);
}