Bananymous
bdbde25784
LibC: Rewrite environ handling
...
environ is only allocated on heap when you insert new variables.
environment variables are only `free`'d if they are `malloc`'d by libc
2025-04-16 21:08:01 +03:00
Bananymous
cf59f89bfb
LibC: Rework constructor/destructor calling
...
constructors are now called in _init_libc instead of crt0
destructors are now registered with atexit() instead of called manually
2025-04-15 23:05:52 +03:00
Bananymous
066ed7e4a1
LibC: merge atexit and __cxa_atexit into common function
2025-04-15 23:05:52 +03:00
Bananymous
4f49d60e4a
DynamicLoader/LibC: lazy malloc environ
...
This allows DynamicLoader to just set the value of global environ symbol
without libc needing to malloc it at startup
2025-04-15 23:05:52 +03:00
Bananymous
691c9fe8e0
LibC: Fix bsearch
...
bsearch had unsigned integer underflow which was UB and returned false
positives
2025-04-02 00:03:50 +03:00
Bananymous
788f5429e1
LibC: Implement spec compliant abort()
2025-04-01 23:09:30 +03:00
Bananymous
0360fd1efe
LibC: Implement mk{,d,s}temp
2024-12-02 20:13:37 +02:00
Bananymous
12bc7480e0
LibC: Implement _Exit
...
This just calls _exit as POSIX says they can be equivalent
2024-11-08 02:52:12 +02:00
Bananymous
f4be37700f
Kernel/userspace: rework floating point math
...
SSE is now unconditionally enabled any where and most of math.h is now
actually implemented. using __builtin_<func> lead to many hangs where
the builtin function would just call itself.
2024-11-03 20:28:15 +02:00
Bananymous
fdddb556ae
LibC: Implement system() more properly
...
Old implementation did not ignore and block needed signals
2024-10-13 22:03:15 +03:00
Bananymous
4189a1c729
LibC: Make _init and _fini weak symbols
...
These seem to be missing sometimes when making shared executables
2024-09-11 14:39:07 +03:00
Bananymous
5f92807fdd
userspace: Allow building without SSE
...
I had added changes that had broken compilation without sse support
2024-09-02 21:25:00 +03:00
Bananymous
5197000124
LibC: Fix qsort for types bigger than 64 bytes
2024-08-11 18:00:05 +03:00
Bananymous
a5a097fa4a
Kernel/LibC: Add initial pseudo terminal support
...
This patch implements posix_openpt() and ptsname()
grantpt() and unlockpt() are left in LibC as stubs, as posix_openpt
currently does all of the needed work.
2024-08-11 01:02:59 +03:00
Bananymous
6cda639869
LibC: Add stubs for tmpfile, mktemp and fchmod
2024-08-09 17:02:49 +03:00
Bananymous
3b23458ecc
LibC: Start work on locales
...
This patch adds 2 locales, POSIX locale and UTF8 locale.
functions `mbstowcs()` and `strcoll()` use locales to do convertions and
comparison respectively.
2024-08-09 15:52:42 +03:00
Bananymous
af4b138094
Kernel/LibC: Implement realpath
...
realpath is implemented as a syscall. This is not really required but it
was the easiest way to get it working as there is already path
canonicalization at kernel level.
2024-06-25 19:32:40 +03:00
Bananymous
c69919738b
BuildSystem: Move all userpace libraries under the userspace directory
...
As the number of libraries is increasing, root directory starts to
expand. This adds better organization for libraries
2024-06-18 13:14:35 +03:00