1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 07:40:45 +00:00

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
6 changed files with 10 additions and 16 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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