-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i32 vs u32 #9
Comments
@EdSchouten Is there a specific reason you defined Line 408 in a3ae008
Edit: Oh, looks like I wrote that line. I'm pretty sure I simply copied the type from your original C headers though. |
I think we picked Though I think that On the other hand, using static cloudabi_errno_t fd_table_get_entry(struct fd_table *ft,
cloudabi_fd_t fd,
cloudabi_rights_t rights_base,
cloudabi_rights_t rights_inheriting,
struct fd_entry **ret)
REQUIRES_SHARED(ft->lock) {
// Test for file descriptor existence.
if (fd >= ft->size)
return CLOUDABI_EBADF;
struct fd_entry *fe = &ft->entries[fd];
... This code will need to be extended if |
I think file descriptors tend to use signed 32-bit integers, whereas the Rust crate uses unsigned. How important is it to expand the potential open files that wide, versus the trade-off of losing some type compatibility between libc vs. CloudABI?
This subtle difference makes it a bit harder to write polyglot programs that can target libc and CloudABI, depending on the toolchain applied.
The text was updated successfully, but these errors were encountered: