X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Faio.h;h=3e351348c79e4d32c7ca18b5702f79a86da75f1d;hp=cf94964f87b69619613af7fc984562c95d9a8cad;hb=ac5d085691e5a797a21ae36111aa0b274e1cf4ba;hpb=13cd969552409e05c941829f2aabb15e2f4d9a1f diff --git a/include/aio.h b/include/aio.h index cf94964f..3e351348 100644 --- a/include/aio.h +++ b/include/aio.h @@ -5,8 +5,11 @@ extern "C" { #endif -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +#if __STDC_VERSION__ >= 199901L +#define __restrict restrict +#elif !defined(__GNUC__) +#define __restrict +#endif #include #include @@ -17,7 +20,7 @@ extern "C" { #include struct aiocb { - int aio_filedes, aio_lio_opcode, aio_reqprio; + int aio_fildes, aio_lio_opcode, aio_reqprio; volatile void *aio_buf; size_t aio_nbytes; struct sigevent aio_sigevent; @@ -41,16 +44,27 @@ struct aiocb { #define LIO_WAIT 0 #define LIO_NOWAIT 1 -ssize_t aio_read(struct aiocb *); -ssize_t aio_write(struct aiocb *); +int aio_read(struct aiocb *); +int aio_write(struct aiocb *); int aio_error(const struct aiocb *); ssize_t aio_return(struct aiocb *); int aio_cancel(int, struct aiocb *); int aio_suspend(const struct aiocb *const [], int, const struct timespec *); int aio_fsync(int, struct aiocb *); -int lio_listio(int, struct aiocb *const [], int, struct sigevent *); +int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sigevent *__restrict); +#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) +#define aiocb64 aiocb +#define aio_read64 aio_read +#define aio_write64 aio_write +#define aio_error64 aio_error +#define aio_return64 aio_return +#define aio_cancel64 aio_cancel +#define aio_suspend64 aio_suspend +#define aio_fsync64 aio_fsync +#define lio_listio64 lio_listio +#define off64_t off_t #endif #ifdef __cplusplus