Everywhere: Remove exceptions for using #include <LibC/...>

Once LibC is installed to the sysroot and its conflicts with libc++
are resolved, including LibC headers in such a way will cause errors
with a modern LLVM-based toolchain.
This commit is contained in:
implicitfield 2023-04-29 22:37:40 +04:00 committed by Andreas Kling
parent 79adeb626b
commit 007f3cdb00
Notes: sideshowbarker 2024-07-16 21:51:02 +09:00
6 changed files with 10 additions and 16 deletions

View file

@ -6,7 +6,7 @@
#pragma once #pragma once
#include <LibC/sys/arch/aarch64/regs.h> #include <sys/arch/aarch64/regs.h>
#include <Kernel/Security/ExecutionMode.h> #include <Kernel/Security/ExecutionMode.h>

View file

@ -7,7 +7,7 @@
#pragma once #pragma once
#include <AK/Types.h> #include <AK/Types.h>
#include <LibC/sys/arch/regs.h> #include <sys/arch/regs.h>
#include <Kernel/Arch/CPU.h> #include <Kernel/Arch/CPU.h>
#include <Kernel/Arch/x86_64/ASM_wrapper.h> #include <Kernel/Arch/x86_64/ASM_wrapper.h>

View file

@ -10,7 +10,7 @@
#include <AK/OwnPtr.h> #include <AK/OwnPtr.h>
#include <Kernel/Arch/RegisterState.h> #include <Kernel/Arch/RegisterState.h>
#include <Kernel/Forward.h> #include <Kernel/Forward.h>
#include <LibC/sys/arch/regs.h> #include <sys/arch/regs.h>
namespace Kernel { namespace Kernel {

View file

@ -29,11 +29,6 @@ LICENSE_HEADER_CHECK_EXCLUDES = {
'Userland/Libraries/LibCpp/Tests/parser/', 'Userland/Libraries/LibCpp/Tests/parser/',
'Userland/Libraries/LibCpp/Tests/preprocessor/' 'Userland/Libraries/LibCpp/Tests/preprocessor/'
} }
LIBC_CHECK_EXCLUDES = {
'Kernel/',
'Userland/Libraries/LibELF/',
'Userland/Libraries/LibRegex/'
}
# We check that "#pragma once" is present # We check that "#pragma once" is present
PRAGMA_ONCE_STRING = '#pragma once' PRAGMA_ONCE_STRING = '#pragma once'
@ -122,9 +117,8 @@ def run():
else: else:
# Bad, the '#pragma once' is missing completely. # Bad, the '#pragma once' is missing completely.
errors_pragma_once_missing.append(filename) errors_pragma_once_missing.append(filename)
if not is_in_prefix_list(filename, LIBC_CHECK_EXCLUDES): if BAD_INCLUDE_LIBC.search(file_content):
if BAD_INCLUDE_LIBC.search(file_content): errors_include_libc.append(filename)
errors_include_libc.append(filename)
if BAD_INCLUDE_COMPLEX.search(file_content): if BAD_INCLUDE_COMPLEX.search(file_content):
errors_include_bad_complex.append(filename) errors_include_bad_complex.append(filename)
if not is_in_prefix_list(filename, INCLUDE_CHECK_EXCLUDES): if not is_in_prefix_list(filename, INCLUDE_CHECK_EXCLUDES):

View file

@ -7,7 +7,7 @@
#pragma once #pragma once
#include <AK/Types.h> #include <AK/Types.h>
#include <LibC/sys/arch/regs.h> #include <sys/arch/regs.h>
#ifndef KERNEL #ifndef KERNEL
# include <AK/DeprecatedString.h> # include <AK/DeprecatedString.h>

View file

@ -17,22 +17,22 @@
#include <AK/Vector.h> #include <AK/Vector.h>
#include <Kernel/API/VirtualMemoryAnnotations.h> #include <Kernel/API/VirtualMemoryAnnotations.h>
#include <Kernel/API/prctl_numbers.h> #include <Kernel/API/prctl_numbers.h>
#include <LibC/bits/pthread_integration.h>
#include <LibC/link.h>
#include <LibC/sys/mman.h>
#include <LibC/unistd.h>
#include <LibELF/AuxiliaryVector.h> #include <LibELF/AuxiliaryVector.h>
#include <LibELF/DynamicLinker.h> #include <LibELF/DynamicLinker.h>
#include <LibELF/DynamicLoader.h> #include <LibELF/DynamicLoader.h>
#include <LibELF/DynamicObject.h> #include <LibELF/DynamicObject.h>
#include <LibELF/Hashes.h> #include <LibELF/Hashes.h>
#include <bits/dlfcn_integration.h> #include <bits/dlfcn_integration.h>
#include <bits/pthread_integration.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <fcntl.h> #include <fcntl.h>
#include <link.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <sys/mman.h>
#include <sys/types.h> #include <sys/types.h>
#include <syscall.h> #include <syscall.h>
#include <unistd.h>
namespace ELF { namespace ELF {