Ver código fonte

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.
implicitfield 2 anos atrás
pai
commit
007f3cdb00

+ 1 - 1
Kernel/Arch/aarch64/RegisterState.h

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

+ 1 - 1
Kernel/Arch/x86_64/RegisterState.h

@@ -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>

+ 1 - 1
Kernel/Tasks/ThreadTracer.h

@@ -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 {
 

+ 2 - 8
Meta/check-style.py

@@ -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):

+ 1 - 1
Userland/Libraries/LibELF/Core.h

@@ -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>

+ 4 - 4
Userland/Libraries/LibELF/DynamicLinker.cpp

@@ -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 {