4725538aa7
Tests: Add tests for memmove and memcmp + correct our memcmp implementation
2022-10-22 19:04:19 +02:00
8908faf6e2
libc: Add strchrnul()
...
Another GNU extension, it's ok.
2022-10-22 18:37:02 +02:00
503a04f0e9
libc: Add strpbrk()
2022-10-22 17:54:33 +02:00
4d71c0ef04
libc: Implement strndup()
2022-10-22 17:49:44 +02:00
9bbb5d0c07
libc: Implement strspn (with a test)
2022-10-22 12:36:31 +02:00
1f5f6a5e3b
libc: Add strcspn (with a test)
2022-10-22 11:57:25 +02:00
fb88459263
libc: Add all missing errors to strerror()
2022-10-22 10:14:40 +02:00
b2f5a0502f
Kernel, libc: Implement O_NONBLOCK
2022-10-21 21:51:03 +02:00
671f2a2de3
Kernel, libc: Implement waitpid()
...
FIXME: exec() is now doing weird page table stuff. But at least it works, no panics :)
2022-10-18 21:30:52 +02:00
e1e86ab889
libc: Add support for EEXIST, ENOTDIR, ENOSPC, ENOTSUP and EPIPE to strerror()
2022-10-16 17:24:58 +02:00
42b6b927c9
libc: Implement strlcpy(), and make strncpy() standard-compliant
2022-10-15 17:24:22 +02:00
5256166e7a
libc: Fix strrchr
2022-10-15 16:06:41 +02:00
6953a28ce8
libc: Implement strrchr()
2022-10-15 15:16:19 +02:00
f13c48b562
libc: make strerror() return "Unknown error" instead of an invalid pointer
2022-10-15 15:14:30 +02:00
a002e75725
libc: Add strstr()
2022-10-15 12:33:36 +02:00
3fde7e46f5
libc: Add strcmp() and strncmp()
2022-10-15 12:30:49 +02:00
3e2a4276e9
libc: Add memcmp() and memmove()
...
Those were there since forever in the kernel, but they haven't been added to libc until now.
2022-10-15 12:23:37 +02:00
94a6336e4d
libc: add memchr(), strnlen(), strdup(), and rename memclr() to bzero()
2022-10-15 12:18:37 +02:00
5f8376409d
Kernel, libc: Implement EFAULT
2022-10-12 19:25:35 +02:00
4091799701
Kernel, libc: Add ENOEXEC (Exec format error)
2022-10-12 19:15:44 +02:00
a3362429d3
libc: Update strerror()
2022-10-12 12:01:18 +02:00
c8c4d31cca
Add a FIXME to string.cpp
2022-10-12 11:20:48 +02:00
19ee20b6f5
libc: Document the functions in string.h
2022-10-12 11:19:14 +02:00
feb8c1c31b
libc: Implement strchr()
2022-10-11 19:50:18 +02:00
1278cec065
VFS: Add a 'type' flag to Nodes, implement EISDIR
2022-10-11 17:48:11 +02:00
da2ede3450
Kernel, libc, userspace: Implement file descriptors
...
Kernel: Implement a descriptor struct which stores the opened node and read offset, and give each task 8 of those.
Implement three syscalls: sys_read, sys_open and sys_close (sys_write still writes to the console instead of using a fd, for now)
Implement three new errors: ENOENT, EBADF and EMFILE.
libc: Implement the new errors, and the new syscalls in syscall().
Also fix _RETURN_WITH_ERRNO() to set errno correctly, which was making strerror() return null, thus crashing perror().
userspace: make init demonstrate the new file API.
2022-10-10 20:21:39 +02:00
ce6ec3585c
Kernel, libc: Add ENOSYS
...
This error is returned by the kernel/C Library when an attempt is made to use a system call that doesn't exist.
2022-10-08 14:18:25 +02:00
8f0b6d80b2
libc: Implement strerror()
2022-10-08 12:29:06 +02:00
028a1b1a3c
libc: Enable even more warnings
2022-10-07 18:19:06 +02:00
48b858af5a
libc: Add strncpy and strncat, and deprecate strcpy and strcat (which, since we're building with -Werror, is an instant ban from using these functions)
2022-10-04 19:08:59 +02:00
db9e1ba17c
Add a memclr() SSE-optimized function
2022-10-02 19:13:33 +02:00
ae95a528f2
Make function stubs in libc loudly abort instead of silently failing
2022-10-02 18:10:53 +02:00
fcf5923cc0
WIP: Add a C Library, let's try to compile a Hosted GCC cross-compiler using this!
2022-10-01 20:59:22 +02:00