summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-09 14:46:23 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-09 15:04:45 +0200
commitf4cec2f11086a355f01c616ba9cb092d56c0319f (patch)
tree9c08cca195f01bafa0da81a15c13fd6c12837688
parent6c87d3afa95121cdecb41552b9571253b3dca31b (diff)
downloadserenity-f4cec2f11086a355f01c616ba9cb092d56c0319f.zip
Kernel: Move File.{cpp,h} into FileSystem/
Also tweak the kernel's Makefile to use -nostdinc and -nostdinc++. This prevents us from picking up random headers from ../Root, which may include older versions of kernel headers. Since we still need <initializer_list> for Vector, we specifically include the necessary GCC path. This is a bit hackish but it works for now.
-rw-r--r--Kernel/Devices/Device.h2
-rw-r--r--Kernel/Devices/IDEDiskDevice.cpp2
-rw-r--r--Kernel/Devices/PCSpeaker.cpp2
-rw-r--r--Kernel/FileSystem/FIFO.h2
-rw-r--r--Kernel/FileSystem/File.cpp (renamed from Kernel/File.cpp)2
-rw-r--r--Kernel/FileSystem/File.h (renamed from Kernel/File.h)0
-rw-r--r--Kernel/FileSystem/InodeFile.h2
-rw-r--r--Kernel/Makefile6
-rw-r--r--Kernel/Net/Socket.h2
-rw-r--r--Kernel/ProcessTracer.h2
-rw-r--r--Kernel/SharedMemory.h2
11 files changed, 13 insertions, 11 deletions
diff --git a/Kernel/Devices/Device.h b/Kernel/Devices/Device.h
index 3b2256cf64..fbe899b55c 100644
--- a/Kernel/Devices/Device.h
+++ b/Kernel/Devices/Device.h
@@ -9,7 +9,7 @@
// There are two main subclasses:
// - BlockDevice (random access)
// - CharacterDevice (sequential)
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
#include <Kernel/UnixTypes.h>
class Device : public File {
diff --git a/Kernel/Devices/IDEDiskDevice.cpp b/Kernel/Devices/IDEDiskDevice.cpp
index e8f967f7e8..68576209c3 100644
--- a/Kernel/Devices/IDEDiskDevice.cpp
+++ b/Kernel/Devices/IDEDiskDevice.cpp
@@ -1,7 +1,7 @@
#include <Kernel/Devices/IDEDiskDevice.h>
#include <Kernel/FileSystem/ProcFS.h>
#include <Kernel/IO.h>
-#include <Kernel/PIC.h>
+#include <Kernel/Arch/i386/PIC.h>
#include <Kernel/Process.h>
#include <Kernel/StdLib.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/Devices/PCSpeaker.cpp b/Kernel/Devices/PCSpeaker.cpp
index 853f53bf77..9975ac9803 100644
--- a/Kernel/Devices/PCSpeaker.cpp
+++ b/Kernel/Devices/PCSpeaker.cpp
@@ -1,7 +1,7 @@
#include <Kernel/Arch/i386/CPU.h>
+#include <Kernel/Arch/i386/PIT.h>
#include <Kernel/Devices/PCSpeaker.h>
#include <Kernel/IO.h>
-#include <Kernel/i8253.h>
void PCSpeaker::tone_on(int frequency)
{
diff --git a/Kernel/FileSystem/FIFO.h b/Kernel/FileSystem/FIFO.h
index bd844dc9f0..77c5427ba2 100644
--- a/Kernel/FileSystem/FIFO.h
+++ b/Kernel/FileSystem/FIFO.h
@@ -1,7 +1,7 @@
#pragma once
#include <Kernel/DoubleBuffer.h>
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
#include <Kernel/UnixTypes.h>
class FileDescription;
diff --git a/Kernel/File.cpp b/Kernel/FileSystem/File.cpp
index 693b21ee74..6f12224027 100644
--- a/Kernel/File.cpp
+++ b/Kernel/FileSystem/File.cpp
@@ -1,4 +1,4 @@
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
#include <Kernel/FileSystem/FileDescription.h>
File::File()
diff --git a/Kernel/File.h b/Kernel/FileSystem/File.h
index 0f26eb6ec1..0f26eb6ec1 100644
--- a/Kernel/File.h
+++ b/Kernel/FileSystem/File.h
diff --git a/Kernel/FileSystem/InodeFile.h b/Kernel/FileSystem/InodeFile.h
index b7101ff753..b2ee30c196 100644
--- a/Kernel/FileSystem/InodeFile.h
+++ b/Kernel/FileSystem/InodeFile.h
@@ -1,6 +1,6 @@
#pragma once
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
class Inode;
diff --git a/Kernel/Makefile b/Kernel/Makefile
index cd4c04c6c5..1f3ba29443 100644
--- a/Kernel/Makefile
+++ b/Kernel/Makefile
@@ -54,7 +54,7 @@ KERNEL_OBJS = \
Devices/PCSpeaker.o \
FileSystem/InodeFile.o \
FileSystem/Custody.o \
- File.o
+ FileSystem/File.o
VFS_OBJS = \
FileSystem/ProcFS.o \
@@ -97,7 +97,9 @@ OBJS = $(CXX_OBJS) Boot/boot.ao
KERNEL = kernel
CXXFLAGS += -ffreestanding -mregparm=3 -mno-80387 -mno-mmx -mno-sse -mno-sse2
-CXXFLAGS += -nostdlib
+CXXFLAGS += -nostdlib -nostdinc -nostdinc++
+CXXFLAGS += -I../Root/usr/local/include/c++/8.3.0/
+CXXFLAGS += -I../Root/usr/local/include/c++/8.3.0/i686-pc-serenity/
DEFINES += -DKERNEL
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
diff --git a/Kernel/Net/Socket.h b/Kernel/Net/Socket.h
index 876424b9ce..2a6a382027 100644
--- a/Kernel/Net/Socket.h
+++ b/Kernel/Net/Socket.h
@@ -4,7 +4,7 @@
#include <AK/RefPtr.h>
#include <AK/RefCounted.h>
#include <AK/Vector.h>
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
#include <Kernel/KResult.h>
#include <Kernel/Lock.h>
#include <Kernel/UnixTypes.h>
diff --git a/Kernel/ProcessTracer.h b/Kernel/ProcessTracer.h
index 2a064625f5..cfde92d2f8 100644
--- a/Kernel/ProcessTracer.h
+++ b/Kernel/ProcessTracer.h
@@ -1,7 +1,7 @@
#pragma once
#include <AK/CircularQueue.h>
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
#include <Kernel/UnixTypes.h>
class ProcessTracer : public File {
diff --git a/Kernel/SharedMemory.h b/Kernel/SharedMemory.h
index ef77bb0c12..81a5860748 100644
--- a/Kernel/SharedMemory.h
+++ b/Kernel/SharedMemory.h
@@ -3,7 +3,7 @@
#include <AK/AKString.h>
#include <AK/RefPtr.h>
#include <AK/RefCounted.h>
-#include <Kernel/File.h>
+#include <Kernel/FileSystem/File.h>
#include <Kernel/KResult.h>
#include <Kernel/UnixTypes.h>