diff options
author | Brian Havard <bjh@apache.org> | 2010-04-04 12:45:00 +0000 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2010-04-04 12:45:00 +0000 |
commit | b5d78241c7ad9c741b5a40db66592d024a722843 (patch) | |
tree | 51cafc458dc7032b8f1c3206c81da7bf910fde5d /file_io/os2 | |
parent | a3bfa7bb218ca4a225819bbb60168eddd050d259 (diff) | |
download | apr-b5d78241c7ad9c741b5a40db66592d024a722843.tar.gz |
OS/2: Share the unix implementation of apr_file_printf() which passes the
>HUGE_STRING_LEN test in testfile.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930676 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2')
-rw-r--r-- | file_io/os2/printf.c | 1 | ||||
-rw-r--r-- | file_io/os2/readwrite.c | 22 |
2 files changed, 1 insertions, 22 deletions
diff --git a/file_io/os2/printf.c b/file_io/os2/printf.c new file mode 100644 index 000000000..a77d25890 --- /dev/null +++ b/file_io/os2/printf.c @@ -0,0 +1 @@ +#include "../unix/printf.c" diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c index 01536e2f4..6ff2feb54 100644 --- a/file_io/os2/readwrite.c +++ b/file_io/os2/readwrite.c @@ -372,28 +372,6 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile) -APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, - const char *format, ...) -{ - int cc; - va_list ap; - char *buf; - int len; - - buf = malloc(HUGE_STRING_LEN); - if (buf == NULL) { - return 0; - } - va_start(ap, format); - len = apr_vsnprintf(buf, HUGE_STRING_LEN, format, ap); - cc = apr_file_puts(buf, fptr); - va_end(ap); - free(buf); - return (cc == APR_SUCCESS) ? len : -1; -} - - - apr_status_t apr_file_check_read(apr_file_t *fd) { int rc; |