Skip to content

Commit 78dd829

Browse files
bossmctgross35
authored andcommitted
musl: Remove redundant definitions
These types are redundant as they are exported from higher-level modules. [ move some non-statfs fixups here from other commits in the series, add context to the commmit message - Trevor ] (backport <rust-lang#3261>) (cherry picked from commit b196045)
1 parent 1fd5ef6 commit 78dd829

File tree

4 files changed

+0
-163
lines changed

4 files changed

+0
-163
lines changed

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

-26
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ pub type c_char = u8;
44
pub type wchar_t = ::c_int;
55

66
s! {
7-
pub struct pthread_attr_t {
8-
__size: [::c_ulong; 7],
9-
}
10-
117
pub struct msqid_ds {
128
pub msg_perm: ::ipc_perm,
139
pub msg_stime: ::time_t,
@@ -22,28 +18,6 @@ s! {
2218
__glibc_reserved5: ::c_ulong,
2319
}
2420

25-
pub struct stat {
26-
pub st_dev: ::dev_t,
27-
pub st_ino: ::ino_t,
28-
pub st_mode: ::mode_t,
29-
pub st_nlink: ::nlink_t,
30-
pub st_uid: ::uid_t,
31-
pub st_gid: ::gid_t,
32-
pub st_rdev: ::dev_t,
33-
pub __pad1: ::dev_t,
34-
pub st_size: ::off_t,
35-
pub st_blksize: ::blksize_t,
36-
pub __pad2: ::c_int,
37-
pub st_blocks: ::blkcnt_t,
38-
pub st_atime: ::time_t,
39-
pub st_atime_nsec: ::c_long,
40-
pub st_mtime: ::time_t,
41-
pub st_mtime_nsec: ::c_long,
42-
pub st_ctime: ::time_t,
43-
pub st_ctime_nsec: ::c_long,
44-
__unused: [::c_int; 2usize],
45-
}
46-
4721
pub struct stat64 {
4822
pub st_dev: ::dev_t,
4923
pub st_ino: ::ino64_t,

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

-21
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,6 @@ s! {
5858
pub ss_size: ::size_t,
5959
}
6060

61-
pub struct stat {
62-
pub st_dev: ::dev_t,
63-
pub st_ino: ::ino64_t,
64-
pub st_mode: ::mode_t,
65-
pub st_nlink: ::nlink_t,
66-
pub st_uid: ::uid_t,
67-
pub st_gid: ::gid_t,
68-
pub st_rdev: ::dev_t,
69-
__pad2: ::c_ushort,
70-
pub st_size: ::off64_t,
71-
pub st_blksize: ::blksize_t,
72-
pub st_blocks: ::blkcnt64_t,
73-
pub st_atime: ::time_t,
74-
pub st_atime_nsec: ::c_long,
75-
pub st_mtime: ::time_t,
76-
pub st_mtime_nsec: ::c_long,
77-
pub st_ctime: ::time_t,
78-
pub st_ctime_nsec: ::c_long,
79-
__unused: [::c_long; 2],
80-
}
81-
8261
pub struct stat64 {
8362
pub st_dev: ::dev_t,
8463
pub st_ino: ::ino64_t,

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

-86
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ pub type c_char = u8;
44
pub type wchar_t = ::c_int;
55

66
s! {
7-
pub struct pthread_attr_t {
8-
__size: [::c_ulong; 7],
9-
}
10-
117
pub struct stat {
128
pub st_dev: ::dev_t,
139
pub st_ino: ::ino_t,
@@ -58,13 +54,6 @@ s! {
5854
pub ss_size: ::size_t,
5955
}
6056

61-
pub struct sigaction {
62-
pub sa_sigaction: ::sighandler_t,
63-
pub sa_mask: ::sigset_t,
64-
pub sa_flags: ::c_int,
65-
pub sa_restorer: ::Option<unsafe extern "C" fn()>,
66-
}
67-
6857
pub struct ipc_perm {
6958
pub __key: ::key_t,
7059
pub uid: ::uid_t,
@@ -121,12 +110,6 @@ s_no_extra_traits! {
121110
//pub const RLIM_INFINITY: ::rlim_t = !0;
122111
pub const VEOF: usize = 4;
123112
pub const RTLD_DEEPBIND: ::c_int = 0x8;
124-
pub const RTLD_GLOBAL: ::c_int = 0x100;
125-
pub const RTLD_NOLOAD: ::c_int = 0x4;
126-
pub const TIOCGSOFTCAR: ::c_ulong = 21529;
127-
pub const TIOCSSOFTCAR: ::c_ulong = 21530;
128-
pub const TIOCGRS485: ::c_int = 21550;
129-
pub const TIOCSRS485: ::c_int = 21551;
130113
//pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
131114
//pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
132115
//pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
@@ -253,38 +236,12 @@ pub const SIG_UNBLOCK: ::c_int = 1;
253236
pub const POLLWRNORM: ::c_short = 256;
254237
pub const POLLWRBAND: ::c_short = 512;
255238
pub const O_ASYNC: ::c_int = 8192;
256-
pub const O_NDELAY: ::c_int = 2048;
257-
pub const EFD_NONBLOCK: ::c_int = 2048;
258239
pub const F_SETOWN: ::c_int = 8;
259240
pub const F_GETOWN: ::c_int = 9;
260241
pub const F_GETLK: ::c_int = 12;
261242
pub const F_SETLK: ::c_int = 13;
262243
pub const F_SETLKW: ::c_int = 14;
263-
pub const SFD_NONBLOCK: ::c_int = 2048;
264-
pub const TCSANOW: ::c_int = 0;
265-
pub const TCSADRAIN: ::c_int = 1;
266-
pub const TCSAFLUSH: ::c_int = 2;
267-
pub const TIOCLINUX: ::c_ulong = 21532;
268-
pub const TIOCGSERIAL: ::c_ulong = 21534;
269-
pub const TIOCEXCL: ::c_ulong = 21516;
270-
pub const TIOCNXCL: ::c_ulong = 21517;
271-
pub const TIOCSCTTY: ::c_ulong = 21518;
272-
pub const TIOCSTI: ::c_ulong = 21522;
273-
pub const TIOCMGET: ::c_ulong = 21525;
274-
pub const TIOCMBIS: ::c_ulong = 21526;
275-
pub const TIOCMBIC: ::c_ulong = 21527;
276-
pub const TIOCMSET: ::c_ulong = 21528;
277-
pub const TIOCCONS: ::c_ulong = 21533;
278-
pub const TIOCM_ST: ::c_int = 8;
279-
pub const TIOCM_SR: ::c_int = 16;
280-
pub const TIOCM_CTS: ::c_int = 32;
281-
pub const TIOCM_CAR: ::c_int = 64;
282-
pub const TIOCM_RNG: ::c_int = 128;
283-
pub const TIOCM_DSR: ::c_int = 256;
284244

285-
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
286-
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
287-
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
288245
pub const O_DIRECT: ::c_int = 16384;
289246
pub const O_DIRECTORY: ::c_int = 65536;
290247
pub const O_LARGEFILE: ::c_int = 0o0100000;
@@ -293,7 +250,6 @@ pub const MAP_HUGETLB: ::c_int = 262144;
293250
pub const MAP_LOCKED: ::c_int = 8192;
294251
pub const MAP_NORESERVE: ::c_int = 16384;
295252
pub const MAP_ANON: ::c_int = 32;
296-
pub const MAP_ANONYMOUS: ::c_int = 32;
297253
pub const MAP_DENYWRITE: ::c_int = 2048;
298254
pub const MAP_EXECUTABLE: ::c_int = 4096;
299255
pub const MAP_POPULATE: ::c_int = 32768;
@@ -306,9 +262,6 @@ pub const ENOTNAM: ::c_int = 118;
306262
pub const ENAVAIL: ::c_int = 119;
307263
pub const EISNAM: ::c_int = 120;
308264
pub const EREMOTEIO: ::c_int = 121;
309-
pub const FIOCLEX: ::c_int = 21585;
310-
pub const FIONCLEX: ::c_int = 21584;
311-
pub const FIONBIO: ::c_int = 21537;
312265
pub const MCL_CURRENT: ::c_int = 1;
313266
pub const MCL_FUTURE: ::c_int = 2;
314267
pub const MCL_ONFAULT: ::c_int = 4;
@@ -365,24 +318,6 @@ pub const BSDLY: ::tcflag_t = 8192;
365318
pub const FFDLY: ::tcflag_t = 32768;
366319
pub const VTDLY: ::tcflag_t = 16384;
367320
pub const XTABS: ::tcflag_t = 6144;
368-
pub const B0: ::speed_t = 0;
369-
pub const B50: ::speed_t = 1;
370-
pub const B75: ::speed_t = 2;
371-
pub const B110: ::speed_t = 3;
372-
pub const B134: ::speed_t = 4;
373-
pub const B150: ::speed_t = 5;
374-
pub const B200: ::speed_t = 6;
375-
pub const B300: ::speed_t = 7;
376-
pub const B600: ::speed_t = 8;
377-
pub const B1200: ::speed_t = 9;
378-
pub const B1800: ::speed_t = 10;
379-
pub const B2400: ::speed_t = 11;
380-
pub const B4800: ::speed_t = 12;
381-
pub const B9600: ::speed_t = 13;
382-
pub const B19200: ::speed_t = 14;
383-
pub const B38400: ::speed_t = 15;
384-
pub const EXTA: ::speed_t = 14;
385-
pub const EXTB: ::speed_t = 15;
386321
pub const B57600: ::speed_t = 4097;
387322
pub const B115200: ::speed_t = 4098;
388323
pub const B230400: ::speed_t = 4099;
@@ -405,27 +340,6 @@ pub const IEXTEN: ::tcflag_t = 32768;
405340
pub const TOSTOP: ::tcflag_t = 256;
406341
pub const FLUSHO: ::tcflag_t = 4096;
407342
pub const EXTPROC: ::tcflag_t = 65536;
408-
pub const TCGETS: ::c_int = 21505;
409-
pub const TCSETS: ::c_int = 21506;
410-
pub const TCSETSW: ::c_int = 21507;
411-
pub const TCSETSF: ::c_int = 21508;
412-
pub const TCGETA: ::c_int = 21509;
413-
pub const TCSETA: ::c_int = 21510;
414-
pub const TCSETAW: ::c_int = 21511;
415-
pub const TCSETAF: ::c_int = 21512;
416-
pub const TCSBRK: ::c_int = 21513;
417-
pub const TCXONC: ::c_int = 21514;
418-
pub const TCFLSH: ::c_int = 21515;
419-
pub const TIOCINQ: ::c_int = 21531;
420-
pub const TIOCGPGRP: ::c_int = 21519;
421-
pub const TIOCSPGRP: ::c_int = 21520;
422-
pub const TIOCOUTQ: ::c_int = 21521;
423-
pub const TIOCGWINSZ: ::c_int = 21523;
424-
pub const TIOCSWINSZ: ::c_int = 21524;
425-
pub const FIONREAD: ::c_int = 21531;
426-
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
427-
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
428-
pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;
429343

430344
pub const SYS_read: ::c_long = 63;
431345
pub const SYS_write: ::c_long = 64;

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

-30
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ pub type __u64 = ::c_ulonglong;
99
pub type __s64 = ::c_longlong;
1010

1111
s! {
12-
pub struct pthread_attr_t {
13-
__size: [::c_ulong; 7],
14-
}
15-
1612
pub struct stat {
1713
pub st_dev: ::dev_t,
1814
pub st_ino: ::ino_t,
@@ -57,19 +53,6 @@ s! {
5753
__unused: [::c_int; 2],
5854
}
5955

60-
pub struct stack_t {
61-
pub ss_sp: *mut ::c_void,
62-
pub ss_flags: ::c_int,
63-
pub ss_size: ::size_t,
64-
}
65-
66-
pub struct sigaction {
67-
pub sa_sigaction: ::sighandler_t,
68-
pub sa_mask: ::sigset_t,
69-
pub sa_flags: ::c_int,
70-
pub sa_restorer: ::Option<unsafe extern "C" fn()>,
71-
}
72-
7356
pub struct ipc_perm {
7457
pub __key: ::key_t,
7558
pub uid: ::uid_t,
@@ -84,19 +67,6 @@ s! {
8467
__unused2: ::c_ulong,
8568
}
8669

87-
pub struct shmid_ds {
88-
pub shm_perm: ::ipc_perm,
89-
pub shm_segsz: ::size_t,
90-
pub shm_atime: ::time_t,
91-
pub shm_dtime: ::time_t,
92-
pub shm_ctime: ::time_t,
93-
pub shm_cpid: ::pid_t,
94-
pub shm_lpid: ::pid_t,
95-
pub shm_nattch: ::shmatt_t,
96-
__unused5: ::c_ulong,
97-
__unused6: ::c_ulong,
98-
}
99-
10070
#[repr(align(8))]
10171
pub struct clone_args {
10272
pub flags: ::c_ulonglong,

0 commit comments

Comments
 (0)