1
0

uio.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _SYS_UIO_H
  2. #define _SYS_UIO_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_size_t
  8. #define __NEED_ssize_t
  9. #define __NEED_struct_iovec
  10. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  11. #define __NEED_off_t
  12. #endif
  13. #ifdef _GNU_SOURCE
  14. #define __NEED_pid_t
  15. #endif
  16. #include <bits/alltypes.h>
  17. #define UIO_MAXIOV 1024
  18. ssize_t readv (int, const struct iovec *, int);
  19. ssize_t writev (int, const struct iovec *, int);
  20. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  21. ssize_t preadv (int, const struct iovec *, int, off_t);
  22. ssize_t pwritev (int, const struct iovec *, int, off_t);
  23. #if defined(_LARGEFILE64_SOURCE)
  24. #define preadv64 preadv
  25. #define pwritev64 pwritev
  26. #define off64_t off_t
  27. #endif
  28. #endif
  29. #ifdef _GNU_SOURCE
  30. ssize_t process_vm_writev(pid_t, const struct iovec *, unsigned long, const struct iovec *, unsigned long, unsigned long);
  31. ssize_t process_vm_readv(pid_t, const struct iovec *, unsigned long, const struct iovec *, unsigned long, unsigned long);
  32. ssize_t preadv2 (int, const struct iovec *, int, off_t, int);
  33. ssize_t pwritev2 (int, const struct iovec *, int, off_t, int);
  34. #define RWF_HIPRI 0x00000001
  35. #define RWF_DSYNC 0x00000002
  36. #define RWF_SYNC 0x00000004
  37. #define RWF_NOWAIT 0x00000008
  38. #define RWF_APPEND 0x00000010
  39. #define RWF_NOAPPEND 0x00000020
  40. #endif
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif