Towards the goal of getting `ninja libc-lint` back to green, fix the numerous
instances of:
warning: header guard does not follow preferred style [llvm-header-guard]
This is because many of our header guards start with `__LLVM` rather than
`LLVM`.
To filter just these warnings:
$ ninja -k2000 libc-lint 2>&1 | grep llvm-header-guard
To automatically apply fixits:
$ find libc/src libc/include libc/test -name \*.h | \
xargs -n1 -I {} clang-tidy {} -p build/compile_commands.json \
-checks='-*,llvm-header-guard' --fix --quiet
Some manual cleanup is still necessary as headers that were missing header
guards outright will have them inserted before the license block (we prefer
them after).
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
//===-- Definition of generic error number macros -------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
|
|
#define LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
|
|
|
|
#define EPERM 1
|
|
#define ENOENT 2
|
|
#define ESRCH 3
|
|
#define EINTR 4
|
|
#define EIO 5
|
|
#define ENXIO 6
|
|
#define E2BIG 7
|
|
#define ENOEXEC 8
|
|
#define EBADF 9
|
|
#define ECHILD 10
|
|
#define EAGAIN 11
|
|
#define ENOMEM 12
|
|
#define EACCES 13
|
|
#define EFAULT 14
|
|
#define ENOTBLK 15
|
|
#define EBUSY 16
|
|
#define EEXIST 17
|
|
#define EXDEV 18
|
|
#define ENODEV 19
|
|
#define ENOTDIR 20
|
|
#define EISDIR 21
|
|
#define EINVAL 22
|
|
#define ENFILE 23
|
|
#define EMFILE 24
|
|
#define ENOTTY 25
|
|
#define ETXTBSY 26
|
|
#define EFBIG 27
|
|
#define ENOSPC 28
|
|
#define ESPIPE 29
|
|
#define EROFS 30
|
|
#define EMLINK 31
|
|
#define EPIPE 32
|
|
#define EDOM 33
|
|
#define ERANGE 34
|
|
#define EILSEQ 35
|
|
|
|
#endif // LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
|