regex memory corruption regression test
[libc-test] / src / api / aio.c
1 #include <aio.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
6 {
7 T(off_t)
8 T(pthread_attr_t)
9 T(size_t)
10 T(ssize_t)
11 T(struct timespec)
12
13 {
14 struct aiocb x;
15 F(int,             aio_fildes)
16 F(off_t,           aio_offset)
17 F(volatile void *, aio_buf)
18 F(size_t,          aio_nbytes)
19 F(int,             aio_reqprio)
20 F(struct sigevent, aio_sigevent)
21 F(int,             aio_lio_opcode)
22 }
23
24 C(AIO_ALLDONE)
25 C(AIO_CANCELED)
26 C(AIO_NOTCANCELED)
27 C(LIO_NOP)
28 C(LIO_NOWAIT)
29 C(LIO_READ)
30 C(LIO_WAIT)
31 C(LIO_WRITE)
32
33 {int(*p)(int,struct aiocb*) = aio_cancel;}
34 {int(*p)(const struct aiocb*) = aio_error;}
35 {int(*p)(int,struct aiocb*) = aio_fsync;}
36 {int(*p)(struct aiocb*) = aio_read;}
37 {ssize_t(*p)(struct aiocb*) = aio_return;}
38 {int(*p)(const struct aiocb*const[],int,const struct timespec*) = aio_suspend;}
39 {int(*p)(struct aiocb*) = aio_write;}
40 {int(*p)(int,struct aiocb*restrict const[restrict],int,struct sigevent*restrict) = lio_listio;}
41 }