summaryrefslogtreecommitdiff
path: root/test/occhild.c
blob: a96885d8271ecf9d2af5a2414b04d8b2c7c81ddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "apr.h"
#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) {
        apr_size_t length = 256;
        apr_file_read(err, buf, &length);
    }
    exit(0); /* just to keep the compiler happy */
}