1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore

With this change, System::foo() becomes Core::System::foo().

Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
This commit is contained in:
Andreas Kling 2021-11-23 10:59:50 +01:00
parent acc2eccede
commit 21a5fb0fa2
32 changed files with 165 additions and 173 deletions

View file

@ -6,6 +6,7 @@
#include <AK/Vector.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/System.h>
#include <LibGUI/Application.h>
#include <LibGUI/Event.h>
#include <LibGUI/Icon.h>
@ -14,7 +15,6 @@
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
#include <LibMain/Main.h>
#include <LibSystem/Wrappers.h>
#include <stdio.h>
#include <time.h>
@ -149,7 +149,7 @@ void Starfield::draw()
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(System::pledge("stdio recvfd sendfd rpath unix", nullptr));
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr));
unsigned star_count = 1000;
unsigned refresh_rate = 16;
@ -164,7 +164,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = GUI::Application::construct(arguments);
TRY(System::pledge("stdio recvfd sendfd rpath", nullptr));
TRY(Core::System::pledge("stdio recvfd sendfd rpath", nullptr));
auto app_icon = GUI::Icon::default_icon("app-screensaver");
auto window = GUI::Window::construct();