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