diff options
Diffstat (limited to 'Userland/Libraries/LibC')
26 files changed, 29 insertions, 30 deletions
diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt index 393addb934..cab661dcb6 100644 --- a/Userland/Libraries/LibC/CMakeLists.txt +++ b/Userland/Libraries/LibC/CMakeLists.txt @@ -81,10 +81,10 @@ add_custom_command( set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES}) serenity_libc_static(LibCStatic c) -target_link_libraries(LibCStatic crt0 ssp) -add_dependencies(LibCStatic LibM) +target_link_libraries(LibCStatic crt0 ssp system) +add_dependencies(LibCStatic LibM LibSystem) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++") serenity_libc(LibC c) -target_link_libraries(LibC crt0 ssp) -add_dependencies(LibC LibM) +target_link_libraries(LibC crt0 ssp system) +add_dependencies(LibC LibM LibSystem) diff --git a/Userland/Libraries/LibC/assert.cpp b/Userland/Libraries/LibC/assert.cpp index 7dcd7a5258..ad9c6837d2 100644 --- a/Userland/Libraries/LibC/assert.cpp +++ b/Userland/Libraries/LibC/assert.cpp @@ -24,12 +24,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/internals.h> +#include <syscall.h> #include <unistd.h> extern "C" { diff --git a/Userland/Libraries/LibC/dirent.cpp b/Userland/Libraries/LibC/dirent.cpp index 8e9701177d..504fa70367 100644 --- a/Userland/Libraries/LibC/dirent.cpp +++ b/Userland/Libraries/LibC/dirent.cpp @@ -26,7 +26,6 @@ #include <AK/Assertions.h> #include <AK/StdLibExtras.h> -#include <Kernel/API/Syscall.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> @@ -34,6 +33,7 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> +#include <syscall.h> #include <unistd.h> extern "C" { diff --git a/Userland/Libraries/LibC/fcntl.cpp b/Userland/Libraries/LibC/fcntl.cpp index 7790bec113..3bd873dff7 100644 --- a/Userland/Libraries/LibC/fcntl.cpp +++ b/Userland/Libraries/LibC/fcntl.cpp @@ -24,11 +24,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <fcntl.h> #include <stdarg.h> #include <string.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/ioctl.cpp b/Userland/Libraries/LibC/ioctl.cpp index c5fee3951e..280c4d5378 100644 --- a/Userland/Libraries/LibC/ioctl.cpp +++ b/Userland/Libraries/LibC/ioctl.cpp @@ -24,11 +24,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <sys/ioctl.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/mman.cpp b/Userland/Libraries/LibC/mman.cpp index b3346d2e1f..0f01395ab5 100644 --- a/Userland/Libraries/LibC/mman.cpp +++ b/Userland/Libraries/LibC/mman.cpp @@ -24,11 +24,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <mman.h> #include <stdio.h> #include <string.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/poll.cpp b/Userland/Libraries/LibC/poll.cpp index 437ea8243a..5695ff1318 100644 --- a/Userland/Libraries/LibC/poll.cpp +++ b/Userland/Libraries/LibC/poll.cpp @@ -24,10 +24,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <poll.h> #include <sys/time.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/sched.cpp b/Userland/Libraries/LibC/sched.cpp index 4e3643bd01..d5139cb1c5 100644 --- a/Userland/Libraries/LibC/sched.cpp +++ b/Userland/Libraries/LibC/sched.cpp @@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <sched.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/serenity.cpp b/Userland/Libraries/LibC/serenity.cpp index 319975c653..8899a2b7df 100644 --- a/Userland/Libraries/LibC/serenity.cpp +++ b/Userland/Libraries/LibC/serenity.cpp @@ -24,10 +24,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <serenity.h> #include <string.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/serenity.h b/Userland/Libraries/LibC/serenity.h index 70ddf295af..8860e89d14 100644 --- a/Userland/Libraries/LibC/serenity.h +++ b/Userland/Libraries/LibC/serenity.h @@ -106,8 +106,8 @@ int anon_create(size_t size, int options); int serenity_readlink(const char* path, size_t path_length, char* buffer, size_t buffer_size); -int getkeymap(char* name_buffer, size_t name_buffer_size, u32* map, u32* shift_map, u32* alt_map, u32* altgr_map, u32* shift_altgr_map); -int setkeymap(const char* name, const u32* map, u32* const shift_map, const u32* alt_map, const u32* altgr_map, const u32* shift_altgr_map); +int getkeymap(char* name_buffer, size_t name_buffer_size, uint32_t* map, uint32_t* shift_map, uint32_t* alt_map, uint32_t* altgr_map, uint32_t* shift_altgr_map); +int setkeymap(const char* name, const uint32_t* map, uint32_t* const shift_map, const uint32_t* alt_map, const uint32_t* altgr_map, const uint32_t* shift_altgr_map); #ifdef __i386__ ALWAYS_INLINE void send_secret_data_to_userspace_emulator(uintptr_t data1, uintptr_t data2, uintptr_t data3) diff --git a/Userland/Libraries/LibC/signal.cpp b/Userland/Libraries/LibC/signal.cpp index 55da42a04d..cea5e149f4 100644 --- a/Userland/Libraries/LibC/signal.cpp +++ b/Userland/Libraries/LibC/signal.cpp @@ -25,12 +25,12 @@ */ #include <AK/Format.h> -#include <Kernel/API/Syscall.h> #include <assert.h> #include <errno.h> #include <setjmp.h> #include <signal.h> #include <string.h> +#include <syscall.h> #include <unistd.h> extern "C" { diff --git a/Userland/Libraries/LibC/stat.cpp b/Userland/Libraries/LibC/stat.cpp index 5de2472dfa..16bee73b9a 100644 --- a/Userland/Libraries/LibC/stat.cpp +++ b/Userland/Libraries/LibC/stat.cpp @@ -24,12 +24,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <assert.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <sys/stat.h> +#include <syscall.h> #include <unistd.h> extern "C" { diff --git a/Userland/Libraries/LibC/stdio.cpp b/Userland/Libraries/LibC/stdio.cpp index f96f4732ad..c1a8bca79f 100644 --- a/Userland/Libraries/LibC/stdio.cpp +++ b/Userland/Libraries/LibC/stdio.cpp @@ -30,7 +30,6 @@ #include <AK/ScopedValueRollback.h> #include <AK/StdLibExtras.h> #include <AK/kmalloc.h> -#include <Kernel/API/Syscall.h> #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -41,6 +40,7 @@ #include <sys/internals.h> #include <sys/types.h> #include <sys/wait.h> +#include <syscall.h> #include <unistd.h> struct FILE { diff --git a/Userland/Libraries/LibC/stdlib.cpp b/Userland/Libraries/LibC/stdlib.cpp index 8a0dc247d0..56f1070e76 100644 --- a/Userland/Libraries/LibC/stdlib.cpp +++ b/Userland/Libraries/LibC/stdlib.cpp @@ -30,7 +30,6 @@ #include <AK/StdLibExtras.h> #include <AK/Types.h> #include <AK/Utf8View.h> -#include <Kernel/API/Syscall.h> #include <LibELF/AuxiliaryVector.h> #include <alloca.h> #include <assert.h> @@ -45,6 +44,7 @@ #include <sys/mman.h> #include <sys/stat.h> #include <sys/wait.h> +#include <syscall.h> #include <unistd.h> static void strtons(const char* str, char** endptr) diff --git a/Userland/Libraries/LibC/sys/prctl.cpp b/Userland/Libraries/LibC/sys/prctl.cpp index d7aa35486b..dbc4b53063 100644 --- a/Userland/Libraries/LibC/sys/prctl.cpp +++ b/Userland/Libraries/LibC/sys/prctl.cpp @@ -24,11 +24,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <sys/prctl.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/sys/ptrace.cpp b/Userland/Libraries/LibC/sys/ptrace.cpp index 9e7eb60c2a..f285ef5bb5 100644 --- a/Userland/Libraries/LibC/sys/ptrace.cpp +++ b/Userland/Libraries/LibC/sys/ptrace.cpp @@ -25,9 +25,9 @@ */ #include <AK/LogStream.h> -#include <Kernel/API/Syscall.h> #include <errno.h> #include <sys/ptrace.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/sys/select.cpp b/Userland/Libraries/LibC/sys/select.cpp index 85c5b03d43..dfc039d12a 100644 --- a/Userland/Libraries/LibC/sys/select.cpp +++ b/Userland/Libraries/LibC/sys/select.cpp @@ -24,11 +24,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <stdio.h> #include <sys/select.h> #include <sys/time.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/sys/socket.cpp b/Userland/Libraries/LibC/sys/socket.cpp index 95d2a015a7..a545e00021 100644 --- a/Userland/Libraries/LibC/sys/socket.cpp +++ b/Userland/Libraries/LibC/sys/socket.cpp @@ -25,12 +25,12 @@ */ #include <AK/Assertions.h> -#include <Kernel/API/Syscall.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <sys/socket.h> #include <sys/uio.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/sys/uio.cpp b/Userland/Libraries/LibC/sys/uio.cpp index 4aad828c65..2fd6c94fe9 100644 --- a/Userland/Libraries/LibC/sys/uio.cpp +++ b/Userland/Libraries/LibC/sys/uio.cpp @@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <sys/uio.h> +#include <syscall.h> extern "C" { diff --git a/Userland/Libraries/LibC/sys/wait.cpp b/Userland/Libraries/LibC/sys/wait.cpp index 9969a8eec2..2cde5e2821 100644 --- a/Userland/Libraries/LibC/sys/wait.cpp +++ b/Userland/Libraries/LibC/sys/wait.cpp @@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <assert.h> #include <sys/wait.h> +#include <syscall.h> #include <unistd.h> extern "C" { diff --git a/Userland/Libraries/LibC/termios.cpp b/Userland/Libraries/LibC/termios.cpp index 1037b0ab61..c1c4238b5c 100644 --- a/Userland/Libraries/LibC/termios.cpp +++ b/Userland/Libraries/LibC/termios.cpp @@ -24,7 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <assert.h> #include <errno.h> #include <sys/ioctl.h> diff --git a/Userland/Libraries/LibC/time.cpp b/Userland/Libraries/LibC/time.cpp index e6e9f06c66..df7010c646 100644 --- a/Userland/Libraries/LibC/time.cpp +++ b/Userland/Libraries/LibC/time.cpp @@ -27,13 +27,13 @@ #include <AK/String.h> #include <AK/StringBuilder.h> #include <AK/Time.h> -#include <Kernel/API/Syscall.h> #include <assert.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <sys/time.h> #include <sys/times.h> +#include <syscall.h> #include <time.h> extern "C" { diff --git a/Userland/Libraries/LibC/times.cpp b/Userland/Libraries/LibC/times.cpp index 012dfc7d70..78400a6294 100644 --- a/Userland/Libraries/LibC/times.cpp +++ b/Userland/Libraries/LibC/times.cpp @@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <sys/times.h> +#include <syscall.h> clock_t times(struct tms* buf) { diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp index b87220f25d..40544d56f0 100644 --- a/Userland/Libraries/LibC/unistd.cpp +++ b/Userland/Libraries/LibC/unistd.cpp @@ -27,7 +27,6 @@ #include <AK/ScopedValueRollback.h> #include <AK/String.h> #include <AK/Vector.h> -#include <Kernel/API/Syscall.h> #include <alloca.h> #include <assert.h> #include <errno.h> @@ -42,6 +41,7 @@ #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/types.h> +#include <syscall.h> #include <termios.h> #include <time.h> #include <unistd.h> diff --git a/Userland/Libraries/LibC/utime.cpp b/Userland/Libraries/LibC/utime.cpp index 501d7f06c2..a75908d80a 100644 --- a/Userland/Libraries/LibC/utime.cpp +++ b/Userland/Libraries/LibC/utime.cpp @@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <string.h> +#include <syscall.h> #include <utime.h> extern "C" { diff --git a/Userland/Libraries/LibC/utsname.cpp b/Userland/Libraries/LibC/utsname.cpp index 23d10ee7e9..c0b9484f1f 100644 --- a/Userland/Libraries/LibC/utsname.cpp +++ b/Userland/Libraries/LibC/utsname.cpp @@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <Kernel/API/Syscall.h> #include <errno.h> #include <sys/utsname.h> +#include <syscall.h> extern "C" { |