Skip to content

Commit 540d140

Browse files
author
Jorge Aparicio
committed
less cfg, way more code
1 parent 9858987 commit 540d140

File tree

13 files changed

+1092
-689
lines changed

13 files changed

+1092
-689
lines changed

src/unix/notbsd/android/mod.rs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,34 @@ s! {
137137
}
138138
}
139139

140+
pub const O_TRUNC: ::c_int = 512;
141+
142+
pub const O_CLOEXEC: ::c_int = 0x80000;
143+
144+
pub const EBFONT: ::c_int = 59;
145+
pub const ENOSTR: ::c_int = 60;
146+
pub const ENODATA: ::c_int = 61;
147+
pub const ETIME: ::c_int = 62;
148+
pub const ENOSR: ::c_int = 63;
149+
pub const ENONET: ::c_int = 64;
150+
pub const ENOPKG: ::c_int = 65;
151+
pub const EREMOTE: ::c_int = 66;
152+
pub const ENOLINK: ::c_int = 67;
153+
pub const EADV: ::c_int = 68;
154+
pub const ESRMNT: ::c_int = 69;
155+
pub const ECOMM: ::c_int = 70;
156+
pub const EPROTO: ::c_int = 71;
157+
pub const EDOTDOT: ::c_int = 73;
158+
159+
pub const SA_NODEFER: ::c_int = 0x40000000;
160+
pub const SA_RESETHAND: ::c_int = 0x80000000;
161+
pub const SA_RESTART: ::c_int = 0x10000000;
162+
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
163+
164+
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
165+
166+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
167+
140168
pub const USER_PROCESS: ::c_short = 7;
141169

142170
pub const BUFSIZ: ::c_uint = 1024;
@@ -227,7 +255,6 @@ pub const FIOCLEX: ::c_int = 0x5451;
227255
pub const SA_ONSTACK: ::c_ulong = 0x08000000;
228256
pub const SA_SIGINFO: ::c_ulong = 0x00000004;
229257
pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
230-
231258
pub const SIGCHLD: ::c_int = 17;
232259
pub const SIGBUS: ::c_int = 7;
233260
pub const SIGUSR1: ::c_int = 10;

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
2+
3+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
4+
5+
pub const NCCS: usize = 32;
6+
7+
pub const O_TRUNC: ::c_int = 512;
8+
9+
pub const O_CLOEXEC: ::c_int = 0x80000;
10+
11+
pub const EBFONT: ::c_int = 59;
12+
pub const ENOSTR: ::c_int = 60;
13+
pub const ENODATA: ::c_int = 61;
14+
pub const ETIME: ::c_int = 62;
15+
pub const ENOSR: ::c_int = 63;
16+
pub const ENONET: ::c_int = 64;
17+
pub const ENOPKG: ::c_int = 65;
18+
pub const EREMOTE: ::c_int = 66;
19+
pub const ENOLINK: ::c_int = 67;
20+
pub const EADV: ::c_int = 68;
21+
pub const ESRMNT: ::c_int = 69;
22+
pub const ECOMM: ::c_int = 70;
23+
pub const EPROTO: ::c_int = 71;
24+
pub const EDOTDOT: ::c_int = 73;
25+
26+
pub const SA_NODEFER: ::c_int = 0x40000000;
27+
pub const SA_RESETHAND: ::c_int = 0x80000000;
28+
pub const SA_RESTART: ::c_int = 0x10000000;
29+
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
30+
31+
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
32+
33+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
34+
135
pub const BUFSIZ: ::c_uint = 8192;
236
pub const TMP_MAX: ::c_uint = 238328;
337
pub const FOPEN_MAX: ::c_uint = 16;

src/unix/notbsd/linux/mod.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ pub const ABMON_10: ::nl_item = 0x20017;
250250
pub const ABMON_11: ::nl_item = 0x20018;
251251
pub const ABMON_12: ::nl_item = 0x20019;
252252

253-
#[cfg(not(target_arch = "sparc64"))]
254-
pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
255-
256253
pub const MON_1: ::nl_item = 0x2001A;
257254
pub const MON_2: ::nl_item = 0x2001B;
258255
pub const MON_3: ::nl_item = 0x2001C;
@@ -503,18 +500,8 @@ pub const EPOLLONESHOT: ::c_int = 0x40000000;
503500
pub const QFMT_VFS_OLD: ::c_int = 1;
504501
pub const QFMT_VFS_V0: ::c_int = 2;
505502

506-
#[cfg(not(target_arch = "sparc64"))]
507-
pub const SFD_CLOEXEC: ::c_int = 0x080000;
508-
#[cfg(target_arch = "sparc64")]
509-
pub const SFD_CLOEXEC: ::c_int = 0x400000;
510-
511503
pub const EFD_SEMAPHORE: ::c_int = 0x1;
512504

513-
#[cfg(not(target_arch = "sparc64"))]
514-
pub const NCCS: usize = 32;
515-
#[cfg(target_arch = "sparc64")]
516-
pub const NCCS: usize = 17;
517-
518505
pub const LOG_NFACILITIES: ::c_int = 24;
519506

520507
pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,40 @@ s! {
8787
}
8888
}
8989

90+
pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
91+
92+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
93+
94+
pub const NCCS: usize = 32;
95+
96+
pub const O_TRUNC: ::c_int = 512;
97+
98+
pub const O_CLOEXEC: ::c_int = 0x80000;
99+
100+
pub const EBFONT: ::c_int = 59;
101+
pub const ENOSTR: ::c_int = 60;
102+
pub const ENODATA: ::c_int = 61;
103+
pub const ETIME: ::c_int = 62;
104+
pub const ENOSR: ::c_int = 63;
105+
pub const ENONET: ::c_int = 64;
106+
pub const ENOPKG: ::c_int = 65;
107+
pub const EREMOTE: ::c_int = 66;
108+
pub const ENOLINK: ::c_int = 67;
109+
pub const EADV: ::c_int = 68;
110+
pub const ESRMNT: ::c_int = 69;
111+
pub const ECOMM: ::c_int = 70;
112+
pub const EPROTO: ::c_int = 71;
113+
pub const EDOTDOT: ::c_int = 73;
114+
115+
pub const SA_NODEFER: ::c_int = 0x40000000;
116+
pub const SA_RESETHAND: ::c_int = 0x80000000;
117+
pub const SA_RESTART: ::c_int = 0x10000000;
118+
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
119+
120+
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
121+
122+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
123+
90124
pub const BUFSIZ: ::c_uint = 1024;
91125
pub const TMP_MAX: ::c_uint = 10000;
92126
pub const FOPEN_MAX: ::c_uint = 1000;

src/unix/notbsd/linux/other/b32/mod.rs

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,198 @@ s! {
6363
}
6464
}
6565

66+
pub const RLIMIT_NOFILE: ::c_int = 7;
67+
pub const RLIMIT_NPROC: ::c_int = 6;
68+
69+
pub const O_APPEND: ::c_int = 1024;
70+
pub const O_CREAT: ::c_int = 64;
71+
pub const O_EXCL: ::c_int = 128;
72+
pub const O_NOCTTY: ::c_int = 256;
73+
pub const O_NONBLOCK: ::c_int = 2048;
74+
pub const O_SYNC: ::c_int = 1052672;
75+
pub const O_RSYNC: ::c_int = 1052672;
76+
pub const O_DSYNC: ::c_int = 4096;
77+
pub const O_FSYNC: ::c_int = 0x101000;
78+
79+
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
80+
81+
pub const EDEADLK: ::c_int = 35;
82+
pub const ENAMETOOLONG: ::c_int = 36;
83+
pub const ENOLCK: ::c_int = 37;
84+
pub const ENOSYS: ::c_int = 38;
85+
pub const ENOTEMPTY: ::c_int = 39;
86+
pub const ELOOP: ::c_int = 40;
87+
pub const ENOMSG: ::c_int = 42;
88+
pub const EIDRM: ::c_int = 43;
89+
pub const ECHRNG: ::c_int = 44;
90+
pub const EL2NSYNC: ::c_int = 45;
91+
pub const EL3HLT: ::c_int = 46;
92+
pub const EL3RST: ::c_int = 47;
93+
pub const ELNRNG: ::c_int = 48;
94+
pub const EUNATCH: ::c_int = 49;
95+
pub const ENOCSI: ::c_int = 50;
96+
pub const EL2HLT: ::c_int = 51;
97+
pub const EBADE: ::c_int = 52;
98+
pub const EBADR: ::c_int = 53;
99+
pub const EXFULL: ::c_int = 54;
100+
pub const ENOANO: ::c_int = 55;
101+
pub const EBADRQC: ::c_int = 56;
102+
pub const EBADSLT: ::c_int = 57;
103+
pub const EMULTIHOP: ::c_int = 72;
104+
pub const EOVERFLOW: ::c_int = 75;
105+
pub const ENOTUNIQ: ::c_int = 76;
106+
pub const EBADFD: ::c_int = 77;
107+
pub const EBADMSG: ::c_int = 74;
108+
pub const EREMCHG: ::c_int = 78;
109+
pub const ELIBACC: ::c_int = 79;
110+
pub const ELIBBAD: ::c_int = 80;
111+
pub const ELIBSCN: ::c_int = 81;
112+
pub const ELIBMAX: ::c_int = 82;
113+
pub const ELIBEXEC: ::c_int = 83;
114+
pub const EILSEQ: ::c_int = 84;
115+
pub const ERESTART: ::c_int = 85;
116+
pub const ESTRPIPE: ::c_int = 86;
117+
pub const EUSERS: ::c_int = 87;
118+
pub const ENOTSOCK: ::c_int = 88;
119+
pub const EDESTADDRREQ: ::c_int = 89;
120+
pub const EMSGSIZE: ::c_int = 90;
121+
pub const EPROTOTYPE: ::c_int = 91;
122+
pub const ENOPROTOOPT: ::c_int = 92;
123+
pub const EPROTONOSUPPORT: ::c_int = 93;
124+
pub const ESOCKTNOSUPPORT: ::c_int = 94;
125+
pub const EOPNOTSUPP: ::c_int = 95;
126+
pub const EPFNOSUPPORT: ::c_int = 96;
127+
pub const EAFNOSUPPORT: ::c_int = 97;
128+
pub const EADDRINUSE: ::c_int = 98;
129+
pub const EADDRNOTAVAIL: ::c_int = 99;
130+
pub const ENETDOWN: ::c_int = 100;
131+
pub const ENETUNREACH: ::c_int = 101;
132+
pub const ENETRESET: ::c_int = 102;
133+
pub const ECONNABORTED: ::c_int = 103;
134+
pub const ECONNRESET: ::c_int = 104;
135+
pub const ENOBUFS: ::c_int = 105;
136+
pub const EISCONN: ::c_int = 106;
137+
pub const ENOTCONN: ::c_int = 107;
138+
pub const ESHUTDOWN: ::c_int = 108;
139+
pub const ETOOMANYREFS: ::c_int = 109;
140+
pub const ETIMEDOUT: ::c_int = 110;
141+
pub const ECONNREFUSED: ::c_int = 111;
142+
pub const EHOSTDOWN: ::c_int = 112;
143+
pub const EHOSTUNREACH: ::c_int = 113;
144+
pub const EALREADY: ::c_int = 114;
145+
pub const EINPROGRESS: ::c_int = 115;
146+
pub const ESTALE: ::c_int = 116;
147+
pub const EDQUOT: ::c_int = 122;
148+
pub const ENOMEDIUM: ::c_int = 123;
149+
pub const EMEDIUMTYPE: ::c_int = 124;
150+
pub const ECANCELED: ::c_int = 125;
151+
pub const ENOKEY: ::c_int = 126;
152+
pub const EKEYEXPIRED: ::c_int = 127;
153+
pub const EKEYREVOKED: ::c_int = 128;
154+
pub const EKEYREJECTED: ::c_int = 129;
155+
pub const EOWNERDEAD: ::c_int = 130;
156+
pub const ENOTRECOVERABLE: ::c_int = 131;
157+
pub const EHWPOISON: ::c_int = 133;
158+
pub const ERFKILL: ::c_int = 132;
159+
160+
pub const SOL_SOCKET: ::c_int = 1;
161+
162+
pub const SO_REUSEADDR: ::c_int = 2;
163+
pub const SO_TYPE: ::c_int = 3;
164+
pub const SO_ERROR: ::c_int = 4;
165+
pub const SO_DONTROUTE: ::c_int = 5;
166+
pub const SO_BROADCAST: ::c_int = 6;
167+
pub const SO_SNDBUF: ::c_int = 7;
168+
pub const SO_RCVBUF: ::c_int = 8;
169+
pub const SO_KEEPALIVE: ::c_int = 9;
170+
pub const SO_OOBINLINE: ::c_int = 10;
171+
pub const SO_LINGER: ::c_int = 13;
172+
pub const SO_REUSEPORT: ::c_int = 15;
173+
pub const SO_ACCEPTCONN: ::c_int = 30;
174+
175+
pub const SA_ONSTACK: ::c_int = 0x08000000;
176+
pub const SA_SIGINFO: ::c_int = 0x00000004;
177+
pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
178+
179+
pub const SIGCHLD: ::c_int = 17;
180+
pub const SIGBUS: ::c_int = 7;
181+
pub const SIGUSR1: ::c_int = 10;
182+
pub const SIGUSR2: ::c_int = 12;
183+
pub const SIGCONT: ::c_int = 18;
184+
pub const SIGSTOP: ::c_int = 19;
185+
pub const SIGTSTP: ::c_int = 20;
186+
pub const SIGURG: ::c_int = 23;
187+
pub const SIGIO: ::c_int = 29;
188+
pub const SIGSYS: ::c_int = 31;
189+
pub const SIGSTKFLT: ::c_int = 16;
190+
pub const SIGUNUSED: ::c_int = 31;
191+
pub const SIGPOLL: ::c_int = 29;
192+
pub const SIGPWR: ::c_int = 30;
193+
pub const SIG_SETMASK: ::c_int = 2;
194+
pub const SIG_BLOCK: ::c_int = 0x000000;
195+
pub const SIG_UNBLOCK: ::c_int = 0x01;
196+
197+
pub const POLLWRNORM: ::c_short = 0x100;
198+
pub const POLLWRBAND: ::c_short = 0x200;
199+
200+
pub const O_ASYNC: ::c_int = 0x2000;
201+
pub const O_NDELAY: ::c_int = 0x800;
202+
203+
pub const PTRACE_DETACH: ::c_uint = 17;
204+
205+
pub const EFD_NONBLOCK: ::c_int = 0x800;
206+
207+
pub const F_GETLK: ::c_int = 5;
208+
pub const F_GETOWN: ::c_int = 9;
209+
pub const F_SETOWN: ::c_int = 8;
210+
pub const F_SETLK: ::c_int = 6;
211+
pub const F_SETLKW: ::c_int = 7;
212+
213+
pub const SFD_NONBLOCK: ::c_int = 0x0800;
214+
215+
pub const TIOCEXCL: ::c_ulong = 0x540C;
216+
pub const TIOCNXCL: ::c_ulong = 0x540D;
217+
pub const TIOCSCTTY: ::c_ulong = 0x540E;
218+
pub const TIOCSTI: ::c_ulong = 0x5412;
219+
pub const TIOCMGET: ::c_ulong = 0x5415;
220+
pub const TIOCMBIS: ::c_ulong = 0x5416;
221+
pub const TIOCMBIC: ::c_ulong = 0x5417;
222+
pub const TIOCMSET: ::c_ulong = 0x5418;
223+
pub const TIOCCONS: ::c_ulong = 0x541D;
224+
pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
225+
226+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
227+
228+
pub const NCCS: usize = 32;
229+
230+
pub const O_TRUNC: ::c_int = 512;
231+
232+
pub const O_CLOEXEC: ::c_int = 0x80000;
233+
234+
pub const EBFONT: ::c_int = 59;
235+
pub const ENOSTR: ::c_int = 60;
236+
pub const ENODATA: ::c_int = 61;
237+
pub const ETIME: ::c_int = 62;
238+
pub const ENOSR: ::c_int = 63;
239+
pub const ENONET: ::c_int = 64;
240+
pub const ENOPKG: ::c_int = 65;
241+
pub const EREMOTE: ::c_int = 66;
242+
pub const ENOLINK: ::c_int = 67;
243+
pub const EADV: ::c_int = 68;
244+
pub const ESRMNT: ::c_int = 69;
245+
pub const ECOMM: ::c_int = 70;
246+
pub const EPROTO: ::c_int = 71;
247+
pub const EDOTDOT: ::c_int = 73;
248+
249+
pub const SA_NODEFER: ::c_int = 0x40000000;
250+
pub const SA_RESETHAND: ::c_int = 0x80000000;
251+
pub const SA_RESTART: ::c_int = 0x10000000;
252+
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
253+
254+
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
255+
256+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
257+
66258
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
67259
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
68260
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;

0 commit comments

Comments
 (0)