File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libc/src/__support/OSUtil/uefi Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 99#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_UEFI_ERROR_H
1010#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_UEFI_ERROR_H
1111
12+ #include " hdr/errno_macros.h"
1213#include " include/llvm-libc-types/EFI_STATUS.h"
1314#include " src/__support/CPP/array.h"
15+ #include " src/__support/CPP/limits.h"
1416#include " src/__support/macros/attributes.h"
1517#include " src/__support/macros/config.h"
16- #include < errno.h>
17- #include < limits.h>
1818
1919namespace LIBC_NAMESPACE_DECL {
2020
21- #define EFI_ERROR_MAX_BIT (1 << ( sizeof ( EFI_STATUS) * sizeof ( char ) - 1 ))
21+ #define EFI_ERROR_MAX_BIT (cpp::numeric_limits< EFI_STATUS>::max( ))
2222#define EFI_ENCODE_ERROR (value ) \
2323 (EFI_ERROR_MAX_BIT | (EFI_ERROR_MAX_BIT >> 2 ) | (value))
2424#define EFI_ENCODE_WARNING (value ) ((EFI_ERROR_MAX_BIT >> 2 ) | (value))
@@ -28,7 +28,7 @@ struct UefiStatusErrnoEntry {
2828 int errno_value;
2929};
3030
31- static constexpr cpp::array<UefiStatusErrnoEntry, 43 > UEFI_STATUS_ERRNO_MAP = {{
31+ static const cpp::array<UefiStatusErrnoEntry, 43 > UEFI_STATUS_ERRNO_MAP = {{
3232 {EFI_SUCCESS, 0 },
3333 {EFI_ENCODE_ERROR (EFI_LOAD_ERROR), EINVAL},
3434 {EFI_ENCODE_ERROR (EFI_INVALID_PARAMETER), EINVAL},
You can’t perform that action at this time.
0 commit comments