Commit Graph

2788 Commits

Author SHA1 Message Date
Jeremy Soller 0de8734ff4 Merge branch 'verify-string-includes' into 'master'
verify string header includes

See merge request redox-os/relibc!1231
2026-04-27 06:56:02 -06:00
Jeremy Soller 9cfa1e50eb Merge branch 'sysresource-trailer' into 'master'
change trailer to after_includes for sys_resource

See merge request redox-os/relibc!1230
2026-04-27 06:55:57 -06:00
Jeremy Soller 97cdf7da2e Merge branch 'netinetin-trailer' into 'master'
add include guard to cbindgen trailer for netinet_in

See merge request redox-os/relibc!1229
2026-04-27 06:55:33 -06:00
Jeremy Soller 4f4e535e18 Merge branch 'netdb-trailer' into 'master'
add include guard to netdb cbindgen trailer

See merge request redox-os/relibc!1228
2026-04-27 06:55:16 -06:00
auronandace b50262b76a verify string header includes 2026-04-27 11:20:59 +01:00
auronandace fad0f5b751 change trailer to after_includes for sys_resource 2026-04-27 10:40:49 +01:00
auronandace 522d88a587 add include guard to cbindgen trailer for netinet_in 2026-04-27 09:15:17 +01:00
auronandace 1544554ceb add include guard to netdb cbindgen trailer 2026-04-27 08:51:26 +01:00
auronandace 16e85bab8b move some constants from cbindgen to Rust in dirent 2026-04-27 08:06:45 +01:00
auronandace 8dc8c05e4d fix sys_wait trailer and include guard 2026-04-25 08:39:53 +01:00
Jeremy Soller 02229def9b Merge branch 'add-file-back' into 'master'
fix libiconv compilation

See merge request redox-os/relibc!1224
2026-04-24 07:00:53 -06:00
Jeremy Soller 54d16f7a65 Merge branch 'remove-allowed-unused-imports' into 'master'
remove unused imports and #[allow(unused_imports)] annotations

See merge request redox-os/relibc!1223
2026-04-24 07:00:04 -06:00
auronandace e5451510fc fix libiconv compilation 2026-04-24 12:06:43 +01:00
sourceturner 8daf17e4f7 remove unused imports and #[allow(unused_imports)] annotations 2026-04-23 21:41:24 +02:00
Connor-GH 313f2be0f8 Pal: Add default method impls and remove duplicated code
I noticed that the Linux and Redox PALs both do very similar things for
a given FS function and its *at variant. For example, `mkdir()` is just
a call to `mkdirat()`. POSIX requires these to be equivalent.
Additionally, we use AT_EMPTY_PATH in some places but note that this is
not POSIX and is instead an extension that Linux (and Redox) implement.
That doesn't really matter though, since this is an implementation
detail. Implementations can choose to implement these functions anyway
and ignore the default impl. Such a case is `fstat`, because the current
Redox impl of `fstatat` relies on `fstat`, and this would cause infinite
recursion.

Future work:

POSIX says that `fcntl(fd, F_DUPFD, 0);` shall be equivalent to
`dup(fd);`. `dup2` might have cases where it can be implemented using
`dup3`. `dup` seemingly cannot be implemented in terms of `dup2`, so the
`fcntl` default implementation is sufficient. `pipe(fds)` is equivalent to
`pipe2(fds, 0);`.
2026-04-23 14:18:04 -05:00
Jeremy Soller 4ec5b2c37b Merge branch 'systypes-internals' into 'master'
move internal types from C to rust

See merge request redox-os/relibc!1221
2026-04-23 09:10:51 -06:00
auronandace e15e7cafdb cargo fmt 2026-04-23 11:21:45 +01:00
auronandace e7f311c2c4 move internal types from C to rust 2026-04-23 11:18:14 +01:00
sourceturner ef46ff8746 rename RTLDState enum members 2026-04-22 21:58:02 +02:00
sourceturner 110646a9da rename bitset type to FdBitSet 2026-04-22 21:58:02 +02:00
Jeremy Soller 084d69af14 Merge branch 'verify-strings-includes' into 'master'
verify strings header includes

See merge request redox-os/relibc!1218
2026-04-22 06:36:07 -06:00
Jeremy Soller 02a494268b Merge branch 'inttypes-bits' into 'master'
move inttypes bits to cbindgen

See merge request redox-os/relibc!1216
2026-04-22 06:35:36 -06:00
Jeremy Soller ea0db54ae5 Merge branch 'sysmman-fix' into 'master'
correct placement of MAP_FAILED

See merge request redox-os/relibc!1219
2026-04-22 06:34:34 -06:00
auronandace 312ce6200f correct placement of MAP_FAILED 2026-04-22 13:12:46 +01:00
auronandace 5596471e9d remove duplicate typedef, silence cbindgen warning 2026-04-22 12:33:07 +01:00
auronandace bf7e77b836 verify strings header includes 2026-04-22 11:40:16 +01:00
auronandace bbb3e08647 add include guards for stdio bits in cbindgen 2026-04-22 09:56:16 +01:00
auronandace f7ab0e579f move inttypes bits to cbindgen 2026-04-22 08:08:24 +01:00
Connor-GH c170acaaba Remove some unused imports that caused CI to fail 2026-04-21 13:36:29 -05:00
Connor-GH 960c4f3b12 move *at functions from fcntl.h to unistd.h 2026-04-21 10:02:13 -05:00
Jeremy Soller 30cc2de953 Merge branch 'faccessat-fchownat' into 'master'
add faccessat(2) and fchownat(2)

See merge request redox-os/relibc!1213
2026-04-20 16:33:30 -06:00
Connor-GH 24e250c339 add faccessat(2) and fchownat(2)
Additionally, we were using the `access` syscall for x86_64 for our
linux PAL. I looked at the linux source and found that using the
`access`
syscall is equivalent to using `faccessat` as we do now: https://elixir.bootlin.com/linux/v6.17.5/source/fs/open.c#L550

Also, some of the `fcntl.h` functions were accidentally implemented and exported from `unistd.h`. They are supposed to be implemented in `fcntl.h` and exported to `unistd.h`. This is now the behavior.
2026-04-20 17:20:18 -05:00
sourceturner 2873086f39 replace deprecated setitimer() in alarm() implementation 2026-04-20 21:37:52 +00:00
sourceturner 138520d1c5 replace deprecated useconds_t type 2026-04-20 21:37:52 +00:00
sourceturner 19e6e61c17 replace deprecated atomic::spin_loop_hint() 2026-04-20 21:37:52 +00:00
sourceturner 1f584a3943 replace deprecated NaiveDateTime::from_timestamp 2026-04-20 21:37:52 +00:00
sourceturner 292fd9e50b replace deprecated memalign() with posix_memalign() 2026-04-20 21:37:52 +00:00
sourceturner 4ffd337b9b add #[allow(deprecated)] annotations
allow using deprecated functions and data structures
in deprecated functions
2026-04-20 21:37:52 +00:00
sourceturner 885118ccac add missing #[deprecated] annotations
add #[deprecated] annotation to functions that are marked
as 'legacy' or 'obsolecent' (according to their comments)
2026-04-20 21:37:52 +00:00
Jeremy Soller cad9a0dfc8 Merge branch 'unlinkat-symlinkat-linkat' into 'master'
add unlinkat(2), symlinkat(2), linkat(2) and expose openat(2)

See merge request redox-os/relibc!1212
2026-04-20 11:31:10 -06:00
Jeremy Soller 61703694a5 Merge branch 'float-bits' into 'master'
move float bits from C to cbindgen

See merge request redox-os/relibc!1210
2026-04-20 11:27:47 -06:00
Connor-GH 0ff79b80a2 add unlinkat(2), symlinkat(2), linkat(2) and expose openat(2)
`linkat(2)` doesn't have `AT_EMPTY_PATH` as a valid flag in this
implementation because it isn't POSIX. We have it (and have
support for it), but it is more effort to add it. If we need it at some
point, it can be added in about 3 lines.

`openat(2)` previously wasn't exposed, and William was not aware of
`Sys::openat`'s existence. We use it under the hood for `mkfifoat(2)`
and friends, so expose it as a libc API. This helps to pass more os-test tests.

Lastly, the 3 implemented syscalls here help pass some os-test tests.
2026-04-20 10:58:25 -05:00
auronandace abd64422c8 move float bits from C to cbindgen 2026-04-20 08:34:51 +01:00
Wildan M 63f1790b41 Define syscall function for linux 2026-04-20 09:09:42 +07:00
Jeremy Soller c21041d0c7 Merge branch 'strtold-conflict' into 'master'
Fix include conflict in strtold

See merge request redox-os/relibc!1206
2026-04-18 07:02:49 -06:00
Wildan M 30ccb7d337 Fix include conflict in strtold 2026-04-18 12:49:02 +07:00
Jeremy Soller 2b69838a48 Merge branch 'sig_atomic_t' into 'master'
Move sig_atomic_t from stdint

See merge request redox-os/relibc!1205
2026-04-17 18:48:29 -06:00
Akshit Gaur 87b16e6d12 Priority Scheduler 2026-04-17 18:45:46 -06:00
Wildan M f59dfab490 Move sig_atomic_t from stdint 2026-04-18 02:31:35 +07:00
Jeremy Soller c35c291bea Merge branch 'susecond-t' into 'master'
Fix linux suseconds_t to fix alarm test

See merge request redox-os/relibc!1203
2026-04-16 06:49:46 -06:00