diff options
Diffstat (limited to 'test/occhild.c')
-rw-r--r-- | test/occhild.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/test/occhild.c b/test/occhild.c index 05df4ae7d..a96885d82 100644 --- a/test/occhild.c +++ b/test/occhild.c @@ -1,16 +1,26 @@ #include "apr.h" -#include <stdio.h> -#if APR_HAVE_UNISTD_H -#include <unistd.h> -#endif +#include "apr_file_io.h" +#include "apr.h" + +#if APR_HAVE_STDLIB_H #include <stdlib.h> +#endif int main(void) { char buf[256]; + apr_file_t *err; + apr_pool_t *p; + + apr_initialize(); + atexit(apr_terminate); + + apr_pool_create(&p, NULL); + apr_file_open_stdin(&err, p); while (1) { - read(STDERR_FILENO, buf, 256); + apr_size_t length = 256; + apr_file_read(err, buf, &length); } - return 0; /* just to keep the compiler happy */ + exit(0); /* just to keep the compiler happy */ } |