Skip to content

Commit 69e89a1

Browse files
committed
Refactored linger struct dry
1 parent 14a4d15 commit 69e89a1

File tree

13 files changed

+5
-60
lines changed

13 files changed

+5
-60
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,6 @@ s! {
287287
pub int_p_sign_posn: ::c_char,
288288
pub int_n_sign_posn: ::c_char,
289289
}
290-
291-
pub struct linger {
292-
pub l_onoff: ::c_int,
293-
pub l_linger: ::c_int,
294-
}
295290
}
296291

297292
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ s! {
155155
pub struct _sem {
156156
data: [u32; 4],
157157
}
158-
159-
pub struct linger {
160-
pub l_onoff: ::c_int,
161-
pub l_linger: ::c_int,
162-
}
163158
}
164159

165160
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);

src/unix/bsd/openbsdlike/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ s! {
5454
pub l_type: ::c_short,
5555
pub l_whence: ::c_short,
5656
}
57-
58-
pub struct linger {
59-
pub l_onoff: ::c_int,
60-
pub l_linger: ::c_int,
61-
}
6257
}
6358

6459
pub const D_T_FMT: ::nl_item = 0;

src/unix/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ s! {
109109
pub ws_xpixel: ::c_ushort,
110110
pub ws_ypixel: ::c_ushort,
111111
}
112+
113+
pub struct linger {
114+
pub l_onoff: ::c_int,
115+
pub l_linger: ::c_int,
116+
}
112117
}
113118

114119
pub const SIG_DFL: sighandler_t = 0 as sighandler_t;

src/unix/notbsd/android/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ s! {
9999
pub struct sem_t {
100100
count: ::c_uint,
101101
}
102-
103-
pub struct linger {
104-
pub l_onoff: ::c_int,
105-
pub l_linger: ::c_int,
106-
}
107102
}
108103

109104
pub const BUFSIZ: ::c_uint = 1024;

src/unix/notbsd/linux/mips.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,6 @@ s! {
198198
__size: [::c_char; 32],
199199
__align: [::c_long; 0],
200200
}
201-
202-
pub struct linger {
203-
pub l_onoff: ::c_int,
204-
pub l_linger: ::c_int,
205-
}
206201
}
207202

208203
pub const BUFSIZ: ::c_uint = 8192;

src/unix/notbsd/linux/musl/b32/arm.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ s! {
8282
pub f_flags: ::c_ulong,
8383
pub f_spare: [::c_ulong; 4],
8484
}
85-
86-
pub struct linger {
87-
pub l_onoff: ::c_int,
88-
pub l_linger: ::c_int,
89-
}
9085
}
9186

9287
pub const O_DIRECT: ::c_int = 0x4000;

src/unix/notbsd/linux/musl/b32/asmjs.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ s! {
8282
pub f_flags: ::c_ulong,
8383
pub f_spare: [::c_ulong; 4],
8484
}
85-
86-
pub struct linger {
87-
pub l_onoff: ::c_int,
88-
pub l_linger: ::c_int,
89-
}
9085
}
9186

9287
pub const O_DIRECT: ::c_int = 0x4000;

src/unix/notbsd/linux/musl/b32/mips.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ s! {
8181
pub f_flags: ::c_ulong,
8282
pub f_spare: [::c_ulong; 5],
8383
}
84-
85-
pub struct linger {
86-
pub l_onoff: ::c_int,
87-
pub l_linger: ::c_int,
88-
}
8984
}
9085

9186
pub const O_DIRECT: ::c_int = 0o100000;

src/unix/notbsd/linux/musl/b32/x86.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ s! {
9595
pub uc_sigmask: ::sigset_t,
9696
__private: [u8; 112],
9797
}
98-
99-
pub struct linger {
100-
pub l_onoff: ::c_int,
101-
pub l_linger: ::c_int,
102-
}
10398
}
10499

105100
pub const O_DIRECT: ::c_int = 0x4000;

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ s! {
104104
pub struct sem_t {
105105
__val: [::c_int; 8],
106106
}
107-
108-
pub struct linger {
109-
pub l_onoff: ::c_int,
110-
pub l_linger: ::c_int,
111-
}
112107
}
113108

114109
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ s! {
130130
__size: [::c_char; 32],
131131
__align: [::c_long; 0],
132132
}
133-
134-
pub struct linger {
135-
pub l_onoff: ::c_int,
136-
pub l_linger: ::c_int,
137-
}
138133
}
139134

140135
pub const RLIMIT_RSS: ::c_int = 5;

src/unix/solaris/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,6 @@ s! {
318318
pub l_pid: ::pid_t,
319319
pub l_pad: [::c_long; 4]
320320
}
321-
322-
pub struct linger {
323-
pub l_onoff: ::c_int,
324-
pub l_linger: ::c_int,
325-
}
326321
}
327322

328323
pub const LC_CTYPE: ::c_int = 0;

0 commit comments

Comments
 (0)