1//===-- Map of C standard error numbers to strings --------------*- 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-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_ERRORS_H
10#define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_ERRORS_H
11
12#include "hdr/errno_macros.h"
13#include "src/__support/StringUtil/message_mapper.h"
14#include "src/__support/macros/config.h"
15
16namespace LIBC_NAMESPACE_DECL {
17
18LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRORS = {
19 MsgMapping(0, "Success"),
20 MsgMapping(EDOM, "Numerical argument out of domain"),
21 MsgMapping(ERANGE, "Numerical result out of range"),
22 MsgMapping(EILSEQ, "Invalid or incomplete multibyte or wide character"),
23};
24
25LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRNO_NAMES = {
26 MsgMapping(0, "0"),
27 MsgMapping(EDOM, "EDOM"),
28 MsgMapping(ERANGE, "ERANGE"),
29 MsgMapping(EILSEQ, "EILSEQ"),
30};
31
32} // namespace LIBC_NAMESPACE_DECL
33
34#endif // LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_ERRORS_H
35

source code of libc/src/__support/StringUtil/tables/stdc_errors.h