Commit Graph

2268 Commits

Author SHA1 Message Date
Jeremy Soller 4a50c8f313 Merge branch 'p12' into 'master'
fix(libc): use `ld.so`'s allocator

See merge request redox-os/relibc!882
2026-01-20 20:35:12 -07:00
sourceturner defd2ce7c3 Deny deny-unsafe_op_in_unsafe_fn on the crate level 2026-01-21 00:41:57 +01:00
sourceturner 582e6eba69 Use unsafe blocks in some more unsafe functions
Building with redoxer showed some more places
that have to use unsafe blocks
2026-01-21 00:41:43 +01:00
Connor-GH cedd1686ba string.h: don't pollute the namespace with locale.h
Previously, we included all of `<locale.h>` in order to get `locale_t`.
This commit separates it into a `<bits/locale-t.h>` header (generated by
cbindgen) to better deal with this.
2026-01-20 14:29:08 -06:00
auronandace 06971ff4bf stdlib header cleanup 2026-01-20 16:43:51 +00:00
auronandace c7e45afd23 cleanup strings endian and elf headers 2026-01-20 15:43:35 +00:00
Anhad Singh bbc86d8027 fix(libc): use ld.so's allocator
Previously, this was implemented incorrectly because `tcb.mspace` was
set just *before* jumping to the program's entry point. However,
`alloc_init` is called when the init functions are run for `libc.so`, so
`tcb.mspace` must be initialized *before* the init functions are
run.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-20 14:00:29 +11:00
Connor-GH 8544c078eb Fix CI regression caused by 0934bcf1
Previously, the CI was failing to build because it didn't
see `locale_t` inside of `<string.h>`. This commit adds
a hacky fix to this so that CI stops failing.

For now, this pollutes the C namespace by including locale
functions and definitions inside of `<string.h>`. In the
future, we will come up with a mechanism to export `locale_t`
by itself.
2026-01-19 18:19:20 -06:00
Connor-GH 0934bcf13e Implement strxfrm_l, strcoll_l, and strerror_l
These implementations are effectively the same as the ones in musl.
2026-01-19 16:58:54 -06:00
Akshit Gaur 3754effab8 Add shutdown syscall 2026-01-19 21:58:06 +05:30
Anhad Singh c05e2da5b3 misc(all): formatting
Signed-off-by: Anhad Singh andypython@protonmail.com
2026-01-19 09:03:44 +00:00
Anhad Singh 81e6d4116a fix(redox/build): missing unsafe blocks
This change was made, commited, pushed and tested entirely on Redox :^)
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-19 08:42:41 +00:00
sourceturner df5d7b2adb Use unsafe blocks in start.rs 2026-01-18 21:57:21 +01:00
sourceturner 86ca639b14 Use unsafe blocks in raw_cell.rs 2026-01-18 21:56:53 +01:00
sourceturner 0107a29e00 Use unsafe blocks in out.rs 2026-01-18 21:56:20 +01:00
sourceturner b5291171d3 Use unsafe blocks in macros.rs 2026-01-18 21:55:50 +01:00
sourceturner 1af4be27c0 Use unsafe blocks in c_vec.rs 2026-01-18 21:54:40 +01:00
sourceturner f6b0b3fde0 Use unsafe blocks in c_str.rs 2026-01-18 21:53:43 +01:00
sourceturner de27858da2 Use unsafe blocks in pthread module 2026-01-18 21:51:49 +01:00
sourceturner 2d5ac47214 Use unsafe blocks in platform module 2026-01-18 21:51:33 +01:00
sourceturner 0f23c03ba4 Use unsafe blocks in io module 2026-01-18 21:51:08 +01:00
sourceturner 718dc53b87 Use unsafe blocks in wchar.h implementation 2026-01-18 21:25:10 +01:00
sourceturner 83815c7433 Use unsafe blocks in utmp.h implementation 2026-01-18 21:23:50 +01:00
sourceturner 61e098eb2c Use unsafe blocks in unistd.h implementation 2026-01-18 21:23:24 +01:00
sourceturner 2cf1a2d16a Use unsafe blocks in time.h implementation 2026-01-18 21:22:57 +01:00
sourceturner 3873cf9a28 Use unsafe blocks in termios.h implementation 2026-01-18 21:21:03 +01:00
sourceturner 1a7136e6c4 Use unsafe blocks in sys/wait.h implementation 2026-01-18 21:20:33 +01:00
sourceturner 560360cb08 Use unsafe blocks in sys/utsname.h implementation 2026-01-18 21:20:14 +01:00
sourceturner 3ccfc170ad Use unsafe blocks in sys/uio.h implementation 2026-01-18 21:19:40 +01:00
sourceturner 3bfd14fcab Use unsafe blocks in sys/time.h implementation 2026-01-18 21:19:08 +01:00
sourceturner 093b830148 Use unsafe blocks in syslog.h implementation 2026-01-18 21:18:45 +01:00
sourceturner 263567f2cc Use unsafe blocks in sys/statvfs.h implementation 2026-01-18 21:18:06 +01:00
sourceturner 95c8e6ddb5 Use unsafe blocks in sys/stat.h implementation 2026-01-18 21:17:21 +01:00
sourceturner ee765594a3 Use unsafe blocks in sys/socket.h implementation 2026-01-18 21:16:57 +01:00
sourceturner 3326fafa90 Use unsafe blocks in sys/select.h implementation 2026-01-18 21:16:37 +01:00
sourceturner e076024268 Use unsafe blocks in sys/resource.h implementation 2026-01-18 21:16:02 +01:00
sourceturner 6aed86d282 Use unsafe blocks in sys/random.h implementation 2026-01-18 21:15:32 +01:00
sourceturner 3bace40832 Use unsafe blocks in ptrace compatibility layer 2026-01-18 21:14:56 +01:00
sourceturner 2720f41032 Use unsafe blocks in sys/mman.h implementation 2026-01-18 21:14:10 +01:00
sourceturner 3879cb641d Use unsafe blocks in ioctl implementation 2026-01-18 21:13:34 +01:00
sourceturner bb3ff6e068 Use unsafe blocks in sys/epoll.h implementation 2026-01-18 21:11:13 +01:00
sourceturner 59fb13ee2c Use unsafe blocks in stdlib.h implementation 2026-01-18 21:10:34 +01:00
sourceturner 891eb61239 Use unsafe blocks in pty.h implementation 2026-01-18 21:10:03 +01:00
sourceturner ac449a4338 Use unsafe blocks in pthread.h implementation 2026-01-18 21:09:17 +01:00
sourceturner e57ef36d3c Use unsafe blocks in netdb.h implementation 2026-01-18 21:01:15 +01:00
Jeremy Soller 2d149b51ae Merge branch 'limits-max' into 'master'
Define max limits in rust

See merge request redox-os/relibc!889
2026-01-17 06:59:05 -07:00
Wildan M 5476770359 Define max limits in rust 2026-01-17 18:17:35 +07:00
Akshit Gaur 1273868a3c stdio: Fix printf-g-hash test 2026-01-17 12:18:22 +05:30
sourceturner f72ecfd8dc Use unsafe blocks in string.h implementation 2026-01-16 21:49:01 +00:00
sourceturner b3f7db83cf Use unsafe blocks in stdio.h implementation 2026-01-16 21:49:01 +00:00