10b57cec5SDimitry Andric //===-- sanitizer_errno_codes.h ---------------------------------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file is shared between sanitizers run-time libraries. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric // Defines errno codes to avoid including errno.h and its dependencies into 120b57cec5SDimitry Andric // sensitive files (e.g. interceptors are not supposed to include any system 130b57cec5SDimitry Andric // headers). 140b57cec5SDimitry Andric // It's ok to use errno.h directly when your file already depend on other system 150b57cec5SDimitry Andric // includes though. 160b57cec5SDimitry Andric // 170b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric #ifndef SANITIZER_ERRNO_CODES_H 200b57cec5SDimitry Andric #define SANITIZER_ERRNO_CODES_H 210b57cec5SDimitry Andric 220b57cec5SDimitry Andric namespace __sanitizer { 230b57cec5SDimitry Andric 240b57cec5SDimitry Andric #define errno_ENOMEM 12 250b57cec5SDimitry Andric #define errno_EBUSY 16 260b57cec5SDimitry Andric #define errno_EINVAL 22 27e8d8bef9SDimitry Andric #define errno_ENAMETOOLONG 36 28*bdd1243dSDimitry Andric #define errno_ENOSYS 38 290b57cec5SDimitry Andric 300b57cec5SDimitry Andric // Those might not present or their value differ on different platforms. 310b57cec5SDimitry Andric extern const int errno_EOWNERDEAD; 320b57cec5SDimitry Andric 330b57cec5SDimitry Andric } // namespace __sanitizer 340b57cec5SDimitry Andric 350b57cec5SDimitry Andric #endif // SANITIZER_ERRNO_CODES_H 36