File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
branches/snap-stage3/src/libnative/io Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 3abc63365895aff78815ea7b57374486f91daebd
4
+ refs/heads/snap-stage3: 19d8ab8d5a311e502a55189d2a34858f8413fbef
5
5
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -26,15 +26,11 @@ use super::file::keep_going;
26
26
#[ cfg( windows) ] pub type sock_t = libc:: SOCKET ;
27
27
#[ cfg( unix) ] pub type sock_t = super :: file:: fd_t ;
28
28
29
- #[ cfg( target_endian = "big" ) ] pub fn htons ( x : u16 ) -> u16 { x }
30
- #[ cfg( target_endian = "big" ) ] pub fn ntohs ( x : u16 ) -> u16 { x }
31
- #[ cfg( target_endian = "little" ) ]
32
29
pub fn htons ( u : u16 ) -> u16 {
33
- unsafe { intrinsics:: bswap16 ( u as i16 ) as u16 }
30
+ intrinsics:: to_be16 ( u as i16 ) as u16
34
31
}
35
- #[ cfg( target_endian = "little" ) ]
36
32
pub fn ntohs ( u : u16 ) -> u16 {
37
- unsafe { intrinsics:: bswap16 ( u as i16 ) as u16 }
33
+ intrinsics:: from_be16 ( u as i16 ) as u16
38
34
}
39
35
40
36
enum InAddr {
You can’t perform that action at this time.
0 commit comments