1 //===-- sanitizer_errno.cc --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is shared between sanitizers run-time libraries.
12 // Defines errno to avoid including errno.h and its dependencies into other
13 // files (e.g. interceptors are not supposed to include any system headers).
15 //===----------------------------------------------------------------------===//
17 #include "sanitizer_errno_codes.h"
18 #include "sanitizer_internal_defs.h"
22 namespace __sanitizer {
24 COMPILER_CHECK(errno_ENOMEM == ENOMEM);
25 COMPILER_CHECK(errno_EBUSY == EBUSY);
26 COMPILER_CHECK(errno_EINVAL == EINVAL);
28 // EOWNERDEAD is not present in some older platforms.
29 #if defined(EOWNERDEAD)
30 extern const int errno_EOWNERDEAD = EOWNERDEAD;
32 extern const int errno_EOWNERDEAD = -1;
35 } // namespace __sanitizer