sanitizer_errno_codes.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. //===-- sanitizer_errno_codes.h ---------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file is shared between sanitizers run-time libraries.
  10. //
  11. // Defines errno codes to avoid including errno.h and its dependencies into
  12. // sensitive files (e.g. interceptors are not supposed to include any system
  13. // headers).
  14. // It's ok to use errno.h directly when your file already depend on other system
  15. // includes though.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef SANITIZER_ERRNO_CODES_H
  19. #define SANITIZER_ERRNO_CODES_H
  20. namespace __sanitizer {
  21. #define errno_ENOMEM 12
  22. #define errno_EBUSY 16
  23. #define errno_EINVAL 22
  24. #define errno_ENAMETOOLONG 36
  25. // Those might not present or their value differ on different platforms.
  26. extern const int errno_EOWNERDEAD;
  27. } // namespace __sanitizer
  28. #endif // SANITIZER_ERRNO_CODES_H