Bananymous
5236e1ef0d
LibC: Add dummy functions for rename() and strftime()
...
I don't really want to implement them right now, but they are required
to exist for some ports.
2024-06-17 21:02:37 +03:00
Bananymous
be7ed8e74a
Kernel/LibC: Implement {get,set}sockopt()
...
These are pretty much dummy functions in the kernel side. Only case that
is handled is SOL_SOCKET with SO_ERROR. This is hard coded to return no
error. Network stack is currently synchronous, so all errors are already
reported through synchronous network functions.
2024-06-17 20:56:48 +03:00
Bananymous
78bcb85679
LibC: Implement gethostbyname()
...
This is not a POSIX function, but curl seems to depend on it. It is
even deprecated on linux...
2024-06-17 20:55:50 +03:00
Bananymous
b98bb9eb27
LibC: Add HOST_NAME_MAX definition
2024-06-17 20:55:17 +03:00
Bananymous
cad55a4da5
Kernel/LibC: Implement getsockname for ipv4 sockets
2024-06-17 20:54:45 +03:00
Bananymous
dafd2fecf7
LibC: Implement gmtime() and localtime()
...
localtime() just returns gmtime() as there is no timezone support
2024-06-17 16:51:41 +03:00
Bananymous
9c5cca784e
LibC: Implement bsearch()
2024-06-17 16:51:24 +03:00
Bananymous
1138165308
LibC: Define PF_* macros on sys/socket.h
2024-06-17 16:50:03 +03:00
Bananymous
d7eb321d58
LibC: Make assert() macro a void expression
2024-06-17 16:49:26 +03:00
Bananymous
05e9d76c77
BAN: Implement will_{addition,multiplication}_overflow
2024-06-14 11:04:29 +03:00
Bananymous
a9b0bfa740
LibC: Make ino_t always 64 bit
2024-06-14 00:18:21 +03:00
Bananymous
aec5a09caf
Kernel/LibC: Implement SYS_ISATTY and isatty()
2024-06-03 03:36:25 +03:00
Bananymous
8bfacb0091
Kernel: Implement deletion of SMO objects
2024-05-31 13:04:23 +03:00
Bananymous
b23511edb1
LibC: Don't use BAN inside pwd.cpp
...
This made pwd.cpp require libstdc++ which meant that getlogin() also
needed libstdc++. This made build process of libstdc++ require itself
which is of course not possible.
2024-05-29 19:12:15 +03:00
Bananymous
d4d530e6c8
Kernel: Implement basic shared memory objects
...
These can allocate memory that can be shared between processes using
a global key. There is currenly no safety checks meaning anyone can
map any shared memory object just by trying to map every possible key.
2024-05-29 15:58:46 +03:00
Bananymous
5b5ccba247
LibC: Define PATH_MAX in limits.h
2024-05-28 01:08:25 +03:00
Bananymous
18e2559b1e
Kernel/LibC: Add SYS_TRUNCATE
2024-05-28 01:08:04 +03:00
Bananymous
e22821799b
LibC: Implement getlogin()
2024-05-23 15:07:21 +03:00
Bananymous
14dd9294aa
LibC: Add _POSIX constants to limits.h
2024-05-23 15:04:59 +03:00
Bananymous
83e3409bd8
Kernel/LibC: Update SYS_SEEK to return new offset and implement lseek
2024-05-23 14:49:23 +03:00
Bananymous
7630170ed6
LibC: Implement qsort as quick sort
2024-05-23 14:44:48 +03:00
Bananymous
0af74fccda
Kernel/LibC: Rework dirent structure
...
dirent now contains statically sized d_name. This allows using
sizeof on the name and dirent properly, which some programs seem
to be using.
2024-05-22 20:19:59 +03:00
Bananymous
0dd74e3c9d
Kernel: Implement syscalls for i686 and cleanup x86_64
...
This actually allows i686 to boot properly!
2024-04-03 02:23:23 +03:00
Bananymous
fe386fa819
Kernel: Implement thread start trampoline for userspace
...
This is needed on i686 to set segment registers.
2024-04-03 00:42:39 +03:00
Bananymous
5050047cef
Kernel: Rewrite whole scheduler
...
Current context saving was very hacky and dependant on compiler
behaviour that was not consistent. Now we always use iret for
context saving. This makes everything more clean.
2024-03-29 18:02:12 +02:00
Bananymous
99e30a4d7d
Kernel: Replace i386 with i686
...
I don't really want to be working with i386 since it doesn't support
compare exchange instruction
2024-03-26 02:48:26 +02:00
Bananymous
fbef90f7cb
Kernel/LibC: Write cxx abi with proper locking
2024-03-26 02:28:10 +02:00
Bananymous
7d1b7436d4
LibC: Dummy ctr* files for i386
...
This allows compilation of libc for i386 targets
2024-03-21 15:20:20 +02:00
Bananymous
65750586b6
LibC: Use GCC builtins for math functions
2024-03-21 15:19:44 +02:00
Bananymous
e447d5fccf
All: remove obsolete gitignore files
...
These have not been in use for almost a year
2024-03-18 15:28:46 +02:00
Bananymous
9c36d7c338
BAN/Kernel: Rework assertion/panic system
...
BAN/Assert.h does not need any includes meaning it can be included
anywhere without problems.
2024-03-04 11:41:54 +02:00
Bananymous
ac9e71d9c7
LibC: Fix parsing mode from string
2024-02-20 13:25:24 +02:00
Bananymous
915dea01c9
LibC: fix printf %e for inf/nan values
2024-02-16 15:34:24 +02:00
Bananymous
566bb73897
LibC: Implement ato* and strto* functions for floating point numbers
2024-02-16 15:28:52 +02:00
Bananymous
1b24c4f279
LibC: Implement strtou{l,ll}
2024-02-15 12:25:56 +02:00
Bananymous
a5a041e637
LibC: Remove cast from S_* macros so they can be used in preprocessor
2024-02-15 12:20:09 +02:00
Bananymous
373d166076
LibC: Implement ato{i,l,ll} and strto{l,ll}
2024-02-14 22:35:23 +02:00
Bananymous
1ba883719a
LibC: Implement popen and pclose
2024-02-14 17:22:45 +02:00
Bananymous
de629291b9
LibC: Implement freopen, rewind and fix bugs in code
...
Now everything will be properly locked once threads are implemented.
All functions "lock" the stream for the wanted operation
2024-02-14 16:36:48 +02:00
Bananymous
4cd9abdd15
LibC: Implement getopt()
2024-02-14 15:00:58 +02:00
Bananymous
198dde8365
Kernel: Add klibc for kernel
...
Now building same source as libc is not needed and libc doesn't
have to do hacks to allow kernel compilation
2024-02-14 15:00:04 +02:00
Bananymous
b56fa4a29d
LibC: Implement fscanf
...
I had missed this when I was implementing *scanf functions
2024-02-14 14:39:22 +02:00
Bananymous
e946b392c9
LibC: Add definition for S_IFMT
...
I was using S_IFMASK, but linux seems to use this
2024-02-14 14:39:22 +02:00
Bananymous
81689b5f02
LibC: Implement most of missing functions from string.h
...
only strcoll*, strxfrm* and strerror_l are left unimplemented
2024-02-14 14:39:22 +02:00
Bananymous
c18d926174
LibC: Fix timeval field name
2024-02-14 03:36:18 +02:00
Bananymous
9314528b9b
Kernel: Improve syscall handling
...
Syscalls are now called from a list of function pointers
2024-02-12 21:51:11 +02:00
Bananymous
3fc1edede0
Kernel/LibC: Implement super basic select
...
This does not really even block but it works... :D
2024-02-12 17:26:33 +02:00
Bananymous
6fb69a1dc2
LibC: Implement inet_ntop for IPv4 addresses
2024-02-08 11:59:11 +02:00
Bananymous
454bee3f02
LibC: Fix sockaddr_un implementation
2024-02-07 15:57:45 +02:00
Bananymous
41cad88d6e
Kernel/LibC: Implement dummy syscalls for accept, connect, listen
2024-02-07 15:57:45 +02:00