mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +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:
parent
acc2eccede
commit
21a5fb0fa2
32 changed files with 165 additions and 173 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "Game.h"
|
||||
#include "GameSizeDialog.h"
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -20,13 +21,12 @@
|
|||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibSystem/Wrappers.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(System::pledge("stdio rpath recvfd sendfd unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd unix", nullptr));
|
||||
|
||||
srand(time(nullptr));
|
||||
|
||||
|
@ -37,10 +37,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
Config::pledge_domains("2048");
|
||||
|
||||
TRY(System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
|
||||
TRY(System::unveil("/res", "r"));
|
||||
TRY(System::unveil(nullptr, nullptr));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
size_t board_size = Config::read_i32("2048", "", "board_size", 4);
|
||||
u32 target_tile = Config::read_i32("2048", "", "target_tile", 2048);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue