Skip to content

Commit

Permalink
chore: add labels to FIXMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
lvllvl committed Jan 8, 2025
1 parent 4bc5300 commit b86d2d6
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 85 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,9 @@ fn test_android(target: &str) {
// Added in API level 26, but some tests use level 24.
"endgrent" => true,

// Added in API level 26, but some tests use level 24.
"getdomainname" | "setdomainname" => true,

// FIXME: bad function pointers:
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3324,6 +3324,7 @@ getaddrinfo
getchar
getchar_unlocked
getcwd
getdomainname
getegid
getenv
geteuid
Expand Down Expand Up @@ -3720,6 +3721,7 @@ sendmsg
sendto
servent
setbuf
setdomainname
setegid
setenv
seteuid
Expand Down
6 changes: 3 additions & 3 deletions src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub type nl_item = c_int;
pub type iconv_t = *mut c_void;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos64_t {} // FIXME: fill this out with a struct
pub enum fpos64_t {} // FIXME(hurd): fill this out with a struct
impl Copy for fpos64_t {}
impl Clone for fpos64_t {
fn clone(&self) -> fpos64_t {
Expand Down Expand Up @@ -814,7 +814,7 @@ s! {
pub ifa_flags: c_uint,
pub ifa_addr: *mut crate::sockaddr,
pub ifa_netmask: *mut crate::sockaddr,
pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union
pub ifa_ifu: *mut crate::sockaddr, // FIXME(union) This should be a union
pub ifa_data: *mut c_void,
}

Expand Down Expand Up @@ -1092,7 +1092,7 @@ cfg_if! {
.field("ut_line", &self.ut_line)
.field("ut_id", &self.ut_id)
.field("ut_user", &self.ut_user)
// FIXME: .field("ut_host", &self.ut_host)
// FIXME(debug): .field("ut_host", &self.ut_host)
.field("ut_exit", &self.ut_exit)
.field("ut_session", &self.ut_session)
.field("ut_tv", &self.ut_tv)
Expand Down
6 changes: 3 additions & 3 deletions src/unix/linux_like/android/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ pub const SYS_personality: c_long = 136;
pub const SYS_afs_syscall: c_long = 137;
pub const SYS_setfsuid: c_long = 138;
pub const SYS_setfsgid: c_long = 139;
// FIXME: SYS__llseek is in the NDK sources but for some reason is
// FIXME(android): SYS__llseek is in the NDK sources but for some reason is
// not available in the tests
// pub const SYS__llseek: c_long = 140;
pub const SYS_getdents: c_long = 141;
// FIXME: SYS__newselect is in the NDK sources but for some reason is
// FIXME(android): SYS__newselect is in the NDK sources but for some reason is
// not available in the tests
// pub const SYS__newselect: c_long = 142;
pub const SYS_flock: c_long = 143;
Expand All @@ -294,7 +294,7 @@ pub const SYS_readv: c_long = 145;
pub const SYS_writev: c_long = 146;
pub const SYS_getsid: c_long = 147;
pub const SYS_fdatasync: c_long = 148;
// FIXME: SYS__llseek is in the NDK sources but for some reason is
// FIXME(android): SYS__llseek is in the NDK sources but for some reason is
// not available in the tests
// pub const SYS__sysctl: c_long = 149;
pub const SYS_mlock: c_long = 150;
Expand Down
6 changes: 3 additions & 3 deletions src/unix/linux_like/android/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ cfg_if! {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_mutex_t")
.field("value", &self.value)
// FIXME: .field("__reserved", &self.__reserved)
// FIXME(debug): .field("__reserved", &self.__reserved)
.finish()
}
}
Expand Down Expand Up @@ -190,7 +190,7 @@ cfg_if! {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_cond_t")
.field("value", &self.value)
// FIXME: .field("__reserved", &self.__reserved)
// FIXME(debug): .field("__reserved", &self.__reserved)
.finish()
}
}
Expand Down Expand Up @@ -227,7 +227,7 @@ cfg_if! {
.field("pendingReaders", &self.pendingReaders)
.field("pendingWriters", &self.pendingWriters)
.field("attr", &self.attr)
// FIXME: .field("__reserved", &self.__reserved)
// FIXME(debug): .field("__reserved", &self.__reserved)
.finish()
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/android/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ cfg_if! {
.field("mxcsr", &self.mxcsr)
.field("mxcr_mask", &self.mxcr_mask)
.field("st_space", &self.st_space)
// FIXME: .field("xmm_space", &self.xmm_space)
// FIXME(debug): .field("xmm_space", &self.xmm_space)
// Ignore padding field
.finish()
}
Expand Down Expand Up @@ -545,7 +545,7 @@ pub const SYS_munlockall: c_long = 152;
pub const SYS_vhangup: c_long = 153;
pub const SYS_modify_ldt: c_long = 154;
pub const SYS_pivot_root: c_long = 155;
// FIXME: SYS__sysctl is in the NDK sources but for some reason is
// FIXME(android): SYS__sysctl is in the NDK sources but for some reason is
// not available in the tests
// pub const SYS__sysctl: c_long = 156;
pub const SYS_prctl: c_long = 157;
Expand Down
8 changes: 4 additions & 4 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand Down Expand Up @@ -728,7 +728,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand Down Expand Up @@ -800,7 +800,7 @@ cfg_if! {
f.debug_struct("lastlog")
.field("ll_time", &self.ll_time)
.field("ll_line", &self.ll_line)
// FIXME: .field("ll_host", &self.ll_host)
// FIXME(debug): .field("ll_host", &self.ll_host)
.finish()
}
}
Expand Down Expand Up @@ -851,7 +851,7 @@ cfg_if! {
.field("ut_line", &self.ut_line)
.field("ut_id", &self.ut_id)
.field("ut_user", &self.ut_user)
// FIXME: .field("ut_host", &self.ut_host)
// FIXME(debug): .field("ut_host", &self.ut_host)
.field("ut_exit", &self.ut_exit)
.field("ut_session", &self.ut_session)
.field("ut_tv", &self.ut_tv)
Expand Down
10 changes: 4 additions & 6 deletions src/unix/linux_like/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub type statvfs64 = crate::statvfs;
pub type dirent64 = crate::dirent;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos64_t {} // FIXME: fill this out with a struct
pub enum fpos64_t {} // FIXME(emscripten): fill this out with a struct
impl Copy for fpos64_t {}
impl Clone for fpos64_t {
fn clone(&self) -> fpos64_t {
Expand Down Expand Up @@ -412,7 +412,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand Down Expand Up @@ -465,7 +465,7 @@ cfg_if! {
.field("totalhigh", &self.totalhigh)
.field("freehigh", &self.freehigh)
.field("mem_unit", &self.mem_unit)
// FIXME: .field("__reserved", &self.__reserved)
// FIXME(debug): .field("__reserved", &self.__reserved)
.finish()
}
}
Expand Down Expand Up @@ -525,7 +525,7 @@ cfg_if! {
impl fmt::Debug for pthread_cond_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_cond_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand Down Expand Up @@ -1576,8 +1576,6 @@ extern "C" {
pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;

pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
pub fn sendmmsg(
sockfd: c_int,
msgvec: *mut crate::mmsghdr,
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ pub const HWCAP_SSBS: c_ulong = 1 << 28;
pub const HWCAP_SB: c_ulong = 1 << 29;
pub const HWCAP_PACA: c_ulong = 1 << 30;
pub const HWCAP_PACG: c_ulong = 1 << 31;
// FIXME: enable these again once linux-api-headers are up to date enough on CI.
// FIXME(linux): enable these again once linux-api-headers are up to date enough on CI.
// See discussion in https://github.com/rust-lang/libc/pull/1638
//pub const HWCAP2_DCPODP: c_ulong = 1 << 0;
//pub const HWCAP2_SVE2: c_ulong = 1 << 1;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/gnu/b64/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ s! {
}

s_no_extra_traits! {
// FIXME: This is actually a union.
// FIXME(union): This is actually a union.
pub struct fpreg_t {
pub d: c_double,
// f: c_float,
Expand Down
6 changes: 3 additions & 3 deletions src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ s_no_extra_traits! {
pub uc_mcontext: mcontext_t,
pub uc_sigmask: crate::sigset_t,
__private: [u8; 512],
// FIXME: the shadow stack field requires glibc >= 2.28.
// FIXME(linux): the shadow stack field requires glibc >= 2.28.
// Re-add once we drop compatibility with glibc versions older than
// 2.28.
//
Expand Down Expand Up @@ -357,7 +357,7 @@ cfg_if! {
.field("mxcsr", &self.mxcsr)
.field("mxcr_mask", &self.mxcr_mask)
.field("st_space", &self.st_space)
// FIXME: .field("xmm_space", &self.xmm_space)
// FIXME(debug): .field("xmm_space", &self.xmm_space)
// Ignore padding field
.finish()
}
Expand Down Expand Up @@ -663,7 +663,7 @@ pub const PR_SPEC_FORCE_DISABLE: c_uint = 1 << 3;
pub const PR_SPEC_DISABLE_NOEXEC: c_uint = 1 << 4;
pub const PR_SPEC_STORE_BYPASS: c_int = 0;
pub const PR_SPEC_INDIRECT_BRANCH: c_int = 1;
// FIXME: perharps for later
// FIXME(linux): perharps for later
//pub const PR_SPEC_L1D_FLUSH: c_int = 2;

pub const MCL_CURRENT: c_int = 0x0001;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ cfg_if! {
.field("ut_line", &self.ut_line)
.field("ut_id", &self.ut_id)
.field("ut_user", &self.ut_user)
// FIXME: .field("ut_host", &self.ut_host)
// FIXME(debug): .field("ut_host", &self.ut_host)
.field("ut_exit", &self.ut_exit)
.field("ut_session", &self.ut_session)
.field("ut_tv", &self.ut_tv)
Expand Down
14 changes: 6 additions & 8 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub type sctp_assoc_t = __s32;
pub type eventfd_t = u64;
missing! {
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos64_t {} // FIXME: fill this out with a struct
pub enum fpos64_t {} // FIXME(linux): fill this out with a struct
}

e! {
Expand Down Expand Up @@ -1836,7 +1836,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand Down Expand Up @@ -1874,7 +1874,7 @@ cfg_if! {
.field("d_off", &self.d_off)
.field("d_reclen", &self.d_reclen)
.field("d_type", &self.d_type)
// FIXME: .field("d_name", &self.d_name)
// FIXME(debug): .field("d_name", &self.d_name)
.finish()
}
}
Expand All @@ -1900,7 +1900,7 @@ cfg_if! {
impl fmt::Debug for pthread_cond_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_cond_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand All @@ -1922,7 +1922,7 @@ cfg_if! {
impl fmt::Debug for pthread_mutex_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_mutex_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand All @@ -1944,7 +1944,7 @@ cfg_if! {
impl fmt::Debug for pthread_rwlock_t {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("pthread_rwlock_t")
// FIXME: .field("size", &self.size)
// FIXME(debug): .field("size", &self.size)
.finish()
}
}
Expand Down Expand Up @@ -6429,8 +6429,6 @@ extern "C" {

pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;

pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
pub fn vhangup() -> c_int;
pub fn sync();
pub fn syncfs(fd: c_int) -> c_int;
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/linux/musl/b32/hexagon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ pub const SIGVTALRM: c_int = 26;
pub const SIGWINCH: c_int = 28;
pub const SIGXCPU: c_int = 24;
pub const SIGXFSZ: c_int = 25;
pub const SIG_SETMASK: c_int = 2; // FIXME check these
pub const SIG_SETMASK: c_int = 2; // FIXME(musl) check these
pub const SIG_BLOCK: c_int = 0x000000;
pub const SIG_UNBLOCK: c_int = 0x01;
pub const SOCK_DGRAM: c_int = 2;
Expand Down Expand Up @@ -286,7 +286,7 @@ pub const SYS_clock_settime: c_int = 112;
pub const SYS_clone: c_int = 220;
pub const SYS_close: c_int = 57;
pub const SYS_connect: c_int = 203;
pub const SYS_copy_file_range: c_int = -1; // FIXME
pub const SYS_copy_file_range: c_int = -1; // FIXME(musl)
pub const SYS_creat: c_int = 1064;
pub const SYS_delete_module: c_int = 106;
pub const SYS_dup2: c_int = 1041;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/musl/b64/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ s! {
}

s_no_extra_traits! {
// FIXME: This is actually a union.
// FIXME(union): This is actually a union.
pub struct fpreg_t {
pub d: c_double,
// f: c_float,
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ cfg_if! {
.field("mxcsr", &self.mxcsr)
.field("mxcr_mask", &self.mxcr_mask)
.field("st_space", &self.st_space)
// FIXME: .field("xmm_space", &self.xmm_space)
// FIXME(debug): .field("xmm_space", &self.xmm_space)
// Ignore padding field
.finish()
}
Expand Down
6 changes: 3 additions & 3 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ s_no_extra_traits! {
pub __reserved: [c_char; 256],
}

// FIXME: musl added paddings and adjusted
// FIXME(musl): musl added paddings and adjusted
// layout in 1.2.0 but our CI is still 1.1.24.
// So, I'm leaving some fields as cfg for now.
// ref. https://github.com/bminor/musl/commit/
Expand Down Expand Up @@ -532,7 +532,7 @@ cfg_if! {
.field("totalhigh", &self.totalhigh)
.field("freehigh", &self.freehigh)
.field("mem_unit", &self.mem_unit)
// FIXME: .field("__reserved", &self.__reserved)
// FIXME(debug): .field("__reserved", &self.__reserved)
.finish()
}
}
Expand Down Expand Up @@ -589,7 +589,7 @@ cfg_if! {
.field("ut_line", &self.ut_line)
.field("ut_id", &self.ut_id)
.field("ut_user", &self.ut_user)
//FIXME: .field("ut_host", &self.ut_host)
//FIXME(debug): .field("ut_host", &self.ut_host)
.field("ut_exit", &self.ut_exit)
.field("ut_session", &self.ut_session)
//.field("__ut_pad2", &self.__ut_pad2)
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/uclibc/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ pub const SYS_pwritev2: c_long = 393;
pub const SYS_pkey_mprotect: c_long = 394;
pub const SYS_pkey_alloc: c_long = 395;
pub const SYS_pkey_free: c_long = 396;
// FIXME: should be a `c_long` too, but a bug slipped in.
// FIXME(linux): should be a `c_long` too, but a bug slipped in.
pub const SYS_statx: c_int = 397;
pub const SYS_pidfd_send_signal: c_long = 424;
pub const SYS_io_uring_setup: c_long = 425;
Expand Down
Loading

0 comments on commit b86d2d6

Please sign in to comment.