uio.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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) || defined(_GNU_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. #endif
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif