Commit Graph

4270 Commits

Author SHA1 Message Date
auronandace 16e85bab8b move some constants from cbindgen to Rust in dirent 2026-04-27 08:06:45 +01:00
Jeremy Soller 9fdb120b2c Merge branch 'sys-wait' into 'master'
fix sys_wait trailer and include guard

See merge request redox-os/relibc!1225
2026-04-25 09:47:11 -06: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
Jeremy Soller 908763a6c9 Merge branch 'pal-cleanup' into 'master'
Pal: Add default method impls and remove duplicated code

See merge request redox-os/relibc!1222
2026-04-24 06:59:19 -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
Jeremy Soller 810b0d85b4 Merge branch 'deny-non_camel_case_types' into 'master'
Deny non camel case types

See merge request redox-os/relibc!1220
2026-04-23 09:10:12 -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 4c32e3ca72 add comment that 'non_camel_case_types' should be allowed 2026-04-22 23:18:43 +02: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
Jeremy Soller 85d14dd90f Merge branch 'stdio-guards' into 'master'
add include guards for stdio bits in cbindgen

See merge request redox-os/relibc!1217
2026-04-22 06:33:40 -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
Jeremy Soller b7989acb58 Merge branch 'unused-imports-fix' into 'master'
Remove some unused imports that caused CI to fail

See merge request redox-os/relibc!1215
2026-04-21 15:15:23 -06:00
Connor-GH c170acaaba Remove some unused imports that caused CI to fail 2026-04-21 13:36:29 -05:00
Jeremy Soller 73823c64ca Merge branch 'at-functions-to-unistd.h' into 'master'
move *at functions from fcntl.h to unistd.h

See merge request redox-os/relibc!1214
2026-04-21 12:26:59 -06: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
Jeremy Soller 3b41e24051 Merge branch 'deny-deprecated' into 'master'
set 'deprecated' lint to 'deny'

See merge request redox-os/relibc!1208
2026-04-20 16:27:58 -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 a886faff59 remove obsolete comment
thanks to Wildan Mubarok for the hint
2026-04-20 21:37:52 +00:00
sourceturner 8b10cbfa1a set 'deprecated' flag to 'deny' 2026-04-20 21:37:52 +00: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 7236cab8db Merge branch 'get-kern-ver' into 'master'
Print kernel version on test

See merge request redox-os/relibc!1211
2026-04-20 11:29:33 -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
Jeremy Soller 2c2bec65ae Merge branch 'syscall-h' into 'master'
Define syscall function for linux

See merge request redox-os/relibc!1209
2026-04-20 11:26:56 -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 b5d7e79f4a Print kernel version on test 2026-04-20 10:28:19 +07:00
Wildan M 63f1790b41 Define syscall function for linux 2026-04-20 09:09:42 +07:00
Jeremy Soller aa8d1386a9 Merge branch 'fix-test-install' into 'master'
Fix relibc-tests-bins

See merge request redox-os/relibc!1207
2026-04-19 08:45:39 -06:00