File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 "type" : " i32"
1010 }
1111 },
12- "f10" : {
13- "body" : [
14- {
15- "text" : " libc::SOCK_NONBLOCK"
16- }
17- ],
18- "return_type" : {
19- "type" : " i32"
20- }
21- },
2212 "f2" : {
2313 "body" : [
2414 {
4232 "f4" : {
4333 "body" : [
4434 {
45- "text" : " libc::SOCK_RAW "
35+ "text" : " libc::SOCK_CLOEXEC "
4636 }
4737 ],
4838 "return_type" : {
5242 "f5" : {
5343 "body" : [
5444 {
55- "text" : " libc::SOCK_RDM"
56- }
57- ],
58- "return_type" : {
59- "type" : " i32"
60- }
61- },
62- "f6" : {
63- "body" : [
64- {
65- "text" : " libc::SOCK_SEQPACKET"
66- }
67- ],
68- "return_type" : {
69- "type" : " i32"
70- }
71- },
72- "f7" : {
73- "body" : [
74- {
75- "text" : " libc::SOCK_DCCP"
76- }
77- ],
78- "return_type" : {
79- "type" : " i32"
80- }
81- },
82- "f8" : {
83- "body" : [
84- {
85- "text" : " libc::SOCK_PACKET"
86- }
87- ],
88- "return_type" : {
89- "type" : " i32"
90- }
91- },
92- "f9" : {
93- "body" : [
94- {
95- "text" : " libc::SOCK_CLOEXEC"
45+ "text" : " libc::SOCK_NONBLOCK"
9646 }
9747 ],
9848 "return_type" : {
Original file line number Diff line number Diff line change @@ -14,29 +14,9 @@ int f3() {
1414}
1515
1616int f4 () {
17- return SOCK_RAW;
18- }
19-
20- int f5 () {
21- return SOCK_RDM;
22- }
23-
24- int f6 () {
25- return SOCK_SEQPACKET;
26- }
27-
28- int f7 () {
29- return SOCK_DCCP;
30- }
31-
32- int f8 () {
33- return SOCK_PACKET;
34- }
35-
36- int f9 () {
3717 return SOCK_CLOEXEC;
3818}
3919
40- int f10 () {
20+ int f5 () {
4121 return SOCK_NONBLOCK;
4222}
Original file line number Diff line number Diff line change @@ -11,29 +11,9 @@ unsafe fn f3() -> i32 {
1111}
1212
1313unsafe fn f4 ( ) -> i32 {
14- libc:: SOCK_RAW
15- }
16-
17- unsafe fn f5 ( ) -> i32 {
18- libc:: SOCK_RDM
19- }
20-
21- unsafe fn f6 ( ) -> i32 {
22- libc:: SOCK_SEQPACKET
23- }
24-
25- unsafe fn f7 ( ) -> i32 {
26- libc:: SOCK_DCCP
27- }
28-
29- unsafe fn f8 ( ) -> i32 {
30- libc:: SOCK_PACKET
31- }
32-
33- unsafe fn f9 ( ) -> i32 {
3414 libc:: SOCK_CLOEXEC
3515}
3616
37- unsafe fn f10 ( ) -> i32 {
17+ unsafe fn f5 ( ) -> i32 {
3818 libc:: SOCK_NONBLOCK
3919}
Original file line number Diff line number Diff line change @@ -12,11 +12,6 @@ pub fn main() {
1212fn main_0 ( ) -> i32 {
1313 assert ! ( ( ( ( libc:: SOCK_STREAM == 1 ) as i32 ) != 0 ) ) ;
1414 assert ! ( ( ( ( libc:: SOCK_DGRAM == 2 ) as i32 ) != 0 ) ) ;
15- assert ! ( ( ( ( libc:: SOCK_RAW == 3 ) as i32 ) != 0 ) ) ;
16- assert ! ( ( ( ( libc:: SOCK_RDM == 4 ) as i32 ) != 0 ) ) ;
17- assert ! ( ( ( ( libc:: SOCK_SEQPACKET == 5 ) as i32 ) != 0 ) ) ;
18- assert ! ( ( ( ( libc:: SOCK_DCCP == 6 ) as i32 ) != 0 ) ) ;
19- assert ! ( ( ( ( libc:: SOCK_PACKET == 10 ) as i32 ) != 0 ) ) ;
2015 let x: Value < i32 > = Rc :: new ( RefCell :: new ( ( libc:: SOCK_STREAM | libc:: SOCK_CLOEXEC ) ) ) ;
2116 assert ! ( ( ( ( ( ( * x. borrow( ) ) & libc:: SOCK_STREAM ) == libc:: SOCK_STREAM ) as i32 ) != 0 ) ) ;
2217 assert ! ( ( ( ( ( ( * x. borrow( ) ) & libc:: SOCK_CLOEXEC ) == libc:: SOCK_CLOEXEC ) as i32 ) != 0 ) ) ;
Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ pub fn main() {
1414unsafe fn main_0 ( ) -> i32 {
1515 assert ! ( ( ( ( ( libc:: SOCK_STREAM ) == ( 1 ) ) as i32 ) != 0 ) ) ;
1616 assert ! ( ( ( ( ( libc:: SOCK_DGRAM ) == ( 2 ) ) as i32 ) != 0 ) ) ;
17- assert ! ( ( ( ( ( libc:: SOCK_RAW ) == ( 3 ) ) as i32 ) != 0 ) ) ;
18- assert ! ( ( ( ( ( libc:: SOCK_RDM ) == ( 4 ) ) as i32 ) != 0 ) ) ;
19- assert ! ( ( ( ( ( libc:: SOCK_SEQPACKET ) == ( 5 ) ) as i32 ) != 0 ) ) ;
20- assert ! ( ( ( ( ( libc:: SOCK_DCCP ) == ( 6 ) ) as i32 ) != 0 ) ) ;
21- assert ! ( ( ( ( ( libc:: SOCK_PACKET ) == ( 10 ) ) as i32 ) != 0 ) ) ;
2217 let mut x: i32 = ( ( libc:: SOCK_STREAM ) | ( libc:: SOCK_CLOEXEC ) ) ;
2318 assert ! ( ( ( ( ( ( x) & ( libc:: SOCK_STREAM ) ) == ( libc:: SOCK_STREAM ) ) as i32 ) != 0 ) ) ;
2419 assert ! ( ( ( ( ( ( x) & ( libc:: SOCK_CLOEXEC ) ) == ( libc:: SOCK_CLOEXEC ) ) as i32 ) != 0 ) ) ;
Original file line number Diff line number Diff line change 55int main () {
66 assert (SOCK_STREAM == 1 );
77 assert (SOCK_DGRAM == 2 );
8- assert (SOCK_RAW == 3 );
9- assert (SOCK_RDM == 4 );
10- assert (SOCK_SEQPACKET == 5 );
11- assert (SOCK_DCCP == 6 );
12- assert (SOCK_PACKET == 10 );
138
149 int x = SOCK_STREAM | SOCK_CLOEXEC ;
1510 assert ((x & SOCK_STREAM ) == SOCK_STREAM );
You can’t perform that action at this time.
0 commit comments