Skip to content

Commit a1bd968

Browse files
committed
Merge branch '4117-part-3' of https://github.com/lvllvl/libc into 4117-part-3
2 parents f5f94f1 + 1ce5acb commit a1bd968

File tree

15 files changed

+37
-33
lines changed

15 files changed

+37
-33
lines changed

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,9 @@ fn test_android(target: &str) {
20812081
// Added in API level 26, but some tests use level 24.
20822082
"endgrent" => true,
20832083

2084+
// Added in API level 26, but some tests use level 24.
2085+
"getdomainname" | "setdomainname" => true,
2086+
20842087
// FIXME: bad function pointers:
20852088
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
20862089
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"

libc-test/semver/android.txt

+2
Original file line numberDiff line numberDiff line change
@@ -3324,6 +3324,7 @@ getaddrinfo
33243324
getchar
33253325
getchar_unlocked
33263326
getcwd
3327+
getdomainname
33273328
getegid
33283329
getenv
33293330
geteuid
@@ -3720,6 +3721,7 @@ sendmsg
37203721
sendto
37213722
servent
37223723
setbuf
3724+
setdomainname
37233725
setegid
37243726
setenv
37253727
seteuid

src/unix/linux_like/emscripten/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1576,8 +1576,6 @@ extern "C" {
15761576
pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
15771577
pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;
15781578

1579-
pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
1580-
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
15811579
pub fn sendmmsg(
15821580
sockfd: c_int,
15831581
msgvec: *mut crate::mmsghdr,

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ pub const HWCAP_SSBS: c_ulong = 1 << 28;
601601
pub const HWCAP_SB: c_ulong = 1 << 29;
602602
pub const HWCAP_PACA: c_ulong = 1 << 30;
603603
pub const HWCAP_PACG: c_ulong = 1 << 31;
604-
// FIXME: enable these again once linux-api-headers are up to date enough on CI.
604+
// FIXME(linux): enable these again once linux-api-headers are up to date enough on CI.
605605
// See discussion in https://github.com/rust-lang/libc/pull/1638
606606
//pub const HWCAP2_DCPODP: c_ulong = 1 << 0;
607607
//pub const HWCAP2_SVE2: c_ulong = 1 << 1;

src/unix/linux_like/linux/gnu/b64/s390x.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ s! {
212212
}
213213

214214
s_no_extra_traits! {
215-
// FIXME: This is actually a union.
215+
// FIXME(union): This is actually a union.
216216
pub struct fpreg_t {
217217
pub d: c_double,
218218
// f: c_float,

src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ s_no_extra_traits! {
308308
pub uc_mcontext: mcontext_t,
309309
pub uc_sigmask: crate::sigset_t,
310310
__private: [u8; 512],
311-
// FIXME: the shadow stack field requires glibc >= 2.28.
311+
// FIXME(linux): the shadow stack field requires glibc >= 2.28.
312312
// Re-add once we drop compatibility with glibc versions older than
313313
// 2.28.
314314
//
@@ -357,7 +357,7 @@ cfg_if! {
357357
.field("mxcsr", &self.mxcsr)
358358
.field("mxcr_mask", &self.mxcr_mask)
359359
.field("st_space", &self.st_space)
360-
// FIXME: .field("xmm_space", &self.xmm_space)
360+
// FIXME(debug): .field("xmm_space", &self.xmm_space)
361361
// Ignore padding field
362362
.finish()
363363
}
@@ -663,7 +663,7 @@ pub const PR_SPEC_FORCE_DISABLE: c_uint = 1 << 3;
663663
pub const PR_SPEC_DISABLE_NOEXEC: c_uint = 1 << 4;
664664
pub const PR_SPEC_STORE_BYPASS: c_int = 0;
665665
pub const PR_SPEC_INDIRECT_BRANCH: c_int = 1;
666-
// FIXME: perharps for later
666+
// FIXME(linux): perharps for later
667667
//pub const PR_SPEC_L1D_FLUSH: c_int = 2;
668668

669669
pub const MCL_CURRENT: c_int = 0x0001;

src/unix/linux_like/linux/gnu/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ cfg_if! {
587587
.field("ut_line", &self.ut_line)
588588
.field("ut_id", &self.ut_id)
589589
.field("ut_user", &self.ut_user)
590-
// FIXME: .field("ut_host", &self.ut_host)
590+
// FIXME(debug): .field("ut_host", &self.ut_host)
591591
.field("ut_exit", &self.ut_exit)
592592
.field("ut_session", &self.ut_session)
593593
.field("ut_tv", &self.ut_tv)

src/unix/linux_like/linux/mod.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub type sctp_assoc_t = __s32;
7676
pub type eventfd_t = u64;
7777
missing! {
7878
#[cfg_attr(feature = "extra_traits", derive(Debug))]
79-
pub enum fpos64_t {} // FIXME: fill this out with a struct
79+
pub enum fpos64_t {} // FIXME(linux): fill this out with a struct
8080
}
8181

8282
e! {
@@ -1836,7 +1836,7 @@ cfg_if! {
18361836
.field("d_off", &self.d_off)
18371837
.field("d_reclen", &self.d_reclen)
18381838
.field("d_type", &self.d_type)
1839-
// FIXME: .field("d_name", &self.d_name)
1839+
// FIXME(debug): .field("d_name", &self.d_name)
18401840
.finish()
18411841
}
18421842
}
@@ -1874,7 +1874,7 @@ cfg_if! {
18741874
.field("d_off", &self.d_off)
18751875
.field("d_reclen", &self.d_reclen)
18761876
.field("d_type", &self.d_type)
1877-
// FIXME: .field("d_name", &self.d_name)
1877+
// FIXME(debug): .field("d_name", &self.d_name)
18781878
.finish()
18791879
}
18801880
}
@@ -1900,7 +1900,7 @@ cfg_if! {
19001900
impl fmt::Debug for pthread_cond_t {
19011901
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19021902
f.debug_struct("pthread_cond_t")
1903-
// FIXME: .field("size", &self.size)
1903+
// FIXME(debug): .field("size", &self.size)
19041904
.finish()
19051905
}
19061906
}
@@ -1922,7 +1922,7 @@ cfg_if! {
19221922
impl fmt::Debug for pthread_mutex_t {
19231923
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19241924
f.debug_struct("pthread_mutex_t")
1925-
// FIXME: .field("size", &self.size)
1925+
// FIXME(debug): .field("size", &self.size)
19261926
.finish()
19271927
}
19281928
}
@@ -1944,7 +1944,7 @@ cfg_if! {
19441944
impl fmt::Debug for pthread_rwlock_t {
19451945
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19461946
f.debug_struct("pthread_rwlock_t")
1947-
// FIXME: .field("size", &self.size)
1947+
// FIXME(debug): .field("size", &self.size)
19481948
.finish()
19491949
}
19501950
}
@@ -6429,8 +6429,6 @@ extern "C" {
64296429

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

6432-
pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
6433-
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
64346432
pub fn vhangup() -> c_int;
64356433
pub fn sync();
64366434
pub fn syncfs(fd: c_int) -> c_int;

src/unix/linux_like/linux/musl/b32/hexagon.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ pub const SIGVTALRM: c_int = 26;
233233
pub const SIGWINCH: c_int = 28;
234234
pub const SIGXCPU: c_int = 24;
235235
pub const SIGXFSZ: c_int = 25;
236-
pub const SIG_SETMASK: c_int = 2; // FIXME check these
236+
pub const SIG_SETMASK: c_int = 2; // FIXME(musl) check these
237237
pub const SIG_BLOCK: c_int = 0x000000;
238238
pub const SIG_UNBLOCK: c_int = 0x01;
239239
pub const SOCK_DGRAM: c_int = 2;
@@ -286,7 +286,7 @@ pub const SYS_clock_settime: c_int = 112;
286286
pub const SYS_clone: c_int = 220;
287287
pub const SYS_close: c_int = 57;
288288
pub const SYS_connect: c_int = 203;
289-
pub const SYS_copy_file_range: c_int = -1; // FIXME
289+
pub const SYS_copy_file_range: c_int = -1; // FIXME(musl)
290290
pub const SYS_creat: c_int = 1064;
291291
pub const SYS_delete_module: c_int = 106;
292292
pub const SYS_dup2: c_int = 1041;

src/unix/linux_like/linux/musl/b64/s390x.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ s! {
6363
}
6464

6565
s_no_extra_traits! {
66-
// FIXME: This is actually a union.
66+
// FIXME(union): This is actually a union.
6767
pub struct fpreg_t {
6868
pub d: c_double,
6969
// f: c_float,

src/unix/linux_like/linux/musl/b64/x86_64/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ cfg_if! {
205205
.field("mxcsr", &self.mxcsr)
206206
.field("mxcr_mask", &self.mxcr_mask)
207207
.field("st_space", &self.st_space)
208-
// FIXME: .field("xmm_space", &self.xmm_space)
208+
// FIXME(debug): .field("xmm_space", &self.xmm_space)
209209
// Ignore padding field
210210
.finish()
211211
}

src/unix/linux_like/linux/musl/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ s_no_extra_traits! {
440440
pub __reserved: [c_char; 256],
441441
}
442442

443-
// FIXME: musl added paddings and adjusted
443+
// FIXME(musl): musl added paddings and adjusted
444444
// layout in 1.2.0 but our CI is still 1.1.24.
445445
// So, I'm leaving some fields as cfg for now.
446446
// ref. https://github.com/bminor/musl/commit/
@@ -532,7 +532,7 @@ cfg_if! {
532532
.field("totalhigh", &self.totalhigh)
533533
.field("freehigh", &self.freehigh)
534534
.field("mem_unit", &self.mem_unit)
535-
// FIXME: .field("__reserved", &self.__reserved)
535+
// FIXME(debug): .field("__reserved", &self.__reserved)
536536
.finish()
537537
}
538538
}
@@ -589,7 +589,7 @@ cfg_if! {
589589
.field("ut_line", &self.ut_line)
590590
.field("ut_id", &self.ut_id)
591591
.field("ut_user", &self.ut_user)
592-
//FIXME: .field("ut_host", &self.ut_host)
592+
//FIXME(debug): .field("ut_host", &self.ut_host)
593593
.field("ut_exit", &self.ut_exit)
594594
.field("ut_session", &self.ut_session)
595595
//.field("__ut_pad2", &self.__ut_pad2)

src/unix/linux_like/linux/uclibc/arm/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ pub const SYS_pwritev2: c_long = 393;
895895
pub const SYS_pkey_mprotect: c_long = 394;
896896
pub const SYS_pkey_alloc: c_long = 395;
897897
pub const SYS_pkey_free: c_long = 396;
898-
// FIXME: should be a `c_long` too, but a bug slipped in.
898+
// FIXME(linux): should be a `c_long` too, but a bug slipped in.
899899
pub const SYS_statx: c_int = 397;
900900
pub const SYS_pidfd_send_signal: c_long = 424;
901901
pub const SYS_io_uring_setup: c_long = 425;

src/unix/linux_like/linux/uclibc/x86_64/mod.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ s! {
142142
}
143143

144144
pub struct stack_t {
145-
// FIXME
145+
// FIXME(ulibc)
146146
pub ss_sp: *mut c_void,
147147
pub ss_flags: c_int,
148148
pub ss_size: size_t,
149149
}
150150

151151
pub struct statfs {
152-
// FIXME
152+
// FIXME(ulibc)
153153
pub f_type: fsword_t,
154154
pub f_bsize: fsword_t,
155155
pub f_blocks: crate::fsblkcnt_t,
@@ -195,7 +195,7 @@ s! {
195195
}
196196

197197
pub struct msghdr {
198-
// FIXME
198+
// FIXME(ulibc)
199199
pub msg_name: *mut c_void,
200200
pub msg_namelen: crate::socklen_t,
201201
pub msg_iov: *mut crate::iovec,
@@ -206,7 +206,7 @@ s! {
206206
}
207207

208208
pub struct termios {
209-
// FIXME
209+
// FIXME(ulibc)
210210
pub c_iflag: crate::tcflag_t,
211211
pub c_oflag: crate::tcflag_t,
212212
pub c_cflag: crate::tcflag_t,
@@ -216,12 +216,12 @@ s! {
216216
}
217217

218218
pub struct sigset_t {
219-
// FIXME
219+
// FIXME(ulibc)
220220
__val: [c_ulong; 16],
221221
}
222222

223223
pub struct sysinfo {
224-
// FIXME
224+
// FIXME(ulibc)
225225
pub uptime: c_long,
226226
pub loads: [c_ulong; 3],
227227
pub totalram: c_ulong,
@@ -239,7 +239,7 @@ s! {
239239
}
240240

241241
pub struct glob_t {
242-
// FIXME
242+
// FIXME(ulibc)
243243
pub gl_pathc: size_t,
244244
pub gl_pathv: *mut *mut c_char,
245245
pub gl_offs: size_t,
@@ -252,15 +252,15 @@ s! {
252252
}
253253

254254
pub struct cpu_set_t {
255-
// FIXME
255+
// FIXME(ulibc)
256256
#[cfg(target_pointer_width = "32")]
257257
bits: [u32; 32],
258258
#[cfg(target_pointer_width = "64")]
259259
bits: [u64; 16],
260260
}
261261

262262
pub struct fsid_t {
263-
// FIXME
263+
// FIXME(ulibc)
264264
__val: [c_int; 2],
265265
}
266266

src/unix/linux_like/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,9 @@ extern "C" {
18631863
locale: crate::locale_t,
18641864
) -> size_t;
18651865
pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char;
1866+
1867+
pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
1868+
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
18661869
}
18671870

18681871
// LFS64 extensions

0 commit comments

Comments
 (0)