#include <sys/prctl.h>
#endif
-#if defined(HAVE_AIO_H)
-#include <aio.h>
-#endif
-
/*
The idea is that this file will eventually have wrappers around all
important system calls in samba. The aims are:
return ret;
}
#endif
-
-#if defined(HAVE_AIO)
-
-/*******************************************************************
- An aio_read wrapper.
-********************************************************************/
-
-int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_READ)
- return aio_read(aiocb);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_write wrapper.
-********************************************************************/
-
-int sys_aio_write(SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_WRITE)
- return aio_write(aiocb);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_return wrapper.
-********************************************************************/
-
-ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_RETURN)
- return aio_return(aiocb);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_cancel wrapper.
-********************************************************************/
-
-int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_CANCEL)
- return aio_cancel(fd, aiocb);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_error wrapper.
-********************************************************************/
-
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_ERROR)
- return aio_error(aiocb);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_fsync wrapper.
-********************************************************************/
-
-int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_FSYNC)
- return aio_fsync(op, aiocb);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_fsync wrapper.
-********************************************************************/
-
-int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout)
-{
-#if defined(HAVE_AIO_FSYNC)
- return aio_suspend(cblist, n, timeout);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-#else /* !HAVE_AIO */
-
-int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int sys_aio_write(SMB_STRUCT_AIOCB *aiocb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout)
-{
- errno = ENOSYS;
- return -1;
-}
-#endif /* HAVE_AIO */