Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

largefile_wrappers.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Wrappers for handling discrepancies in LF64-themed syscalls availability and
  3. * necessity between verious architectures and kernel veriosns.
  4. *
  5. * Copyright (c) 2012-2018 The strace developers.
  6. * All rights reserved.
  7. *
  8. * SPDX-License-Identifier: LGPL-2.1-or-later
  9. */
  10. #ifndef STRACE_LARGEFILE_WRAPPERS_H
  11. # define STRACE_LARGEFILE_WRAPPERS_H
  12. # include "defs.h"
  13. # ifdef _LARGEFILE64_SOURCE
  14. # if defined HAVE_OPEN64
  15. # define open_file open64
  16. # else
  17. # define open_file open
  18. # endif
  19. # ifdef HAVE_FOPEN64
  20. # define fopen_stream fopen64
  21. # else
  22. # define fopen_stream fopen
  23. # endif
  24. # define strace_stat_t struct stat64
  25. # define stat_file stat64
  26. # define fstat_file fstat64
  27. # define struct_dirent struct dirent64
  28. # define read_dir readdir64
  29. # define struct_rlimit struct rlimit64
  30. # define set_rlimit setrlimit64
  31. # else
  32. # define open_file open
  33. # define fopen_stream fopen
  34. # define strace_stat_t struct stat
  35. # define stat_file stat
  36. # define fstat_file fstat
  37. # define struct_dirent struct dirent
  38. # define read_dir readdir
  39. # define struct_rlimit struct rlimit
  40. # define set_rlimit setrlimit
  41. # endif
  42. #endif /* STRACE_LARGEFILE_WRAPPERS_H */