Update LOCAL_PATCHES after libsanitizer merge.
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_errno.cc
blobb65f0e7ddf15668edf3f248ad2681a235885d1ce
1 //===-- sanitizer_errno.cc --------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is shared between sanitizers run-time libraries.
9 //
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"
18 #include <errno.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;
29 #else
30 extern const int errno_EOWNERDEAD = -1;
31 #endif
33 } // namespace __sanitizer