brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 10a98a9 Raw
46 lines · c
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-exception6//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 into12// sensitive files (e.g. interceptors are not supposed to include any system13// headers).14// It's ok to use errno.h directly when your file already depend on other system15// includes though.16//17//===----------------------------------------------------------------------===//18 19#ifndef SANITIZER_ERRNO_CODES_H20#define SANITIZER_ERRNO_CODES_H21 22namespace __sanitizer {23 24#ifdef __HAIKU__25#  define errno_ENOMEM (0x80000000)26#  define errno_EBUSY (0x80000000 + 14)27#  define errno_EINVAL (0x80000000 + 5)28#  define errno_ERANGE (0x80007000 + 17)29#  define errno_ENAMETOOLONG (0x80000000 + 0x6004)30#  define errno_ENOSYS (0x80007009)31#else32#  define errno_ENOMEM 1233#  define errno_EBUSY 1634#  define errno_EINVAL 2235#  define errno_ERANGE 3436#  define errno_ENAMETOOLONG 3637#  define errno_ENOSYS 3838#endif39 40// Those might not present or their value differ on different platforms.41extern const int errno_EOWNERDEAD;42 43}  // namespace __sanitizer44 45#endif  // SANITIZER_ERRNO_CODES_H46