File tree 6 files changed +13
-11
lines changed 6 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ pub fn init() {
83
83
}
84
84
}
85
85
86
- #[ cfg( not( target_os = "nacl" ) ) ]
86
+ #[ cfg( not( any ( target_os = "nacl" , target_os = "emscripten" ) ) ) ]
87
87
unsafe fn reset_sigpipe ( ) {
88
88
assert ! ( signal( libc:: SIGPIPE , libc:: SIG_IGN ) != !0 ) ;
89
89
}
90
- #[ cfg( target_os = "nacl" ) ]
90
+ #[ cfg( any ( target_os = "nacl" , target_os = "emscripten" ) ) ]
91
91
unsafe fn reset_sigpipe ( ) { }
92
92
}
93
93
Original file line number Diff line number Diff line change @@ -551,11 +551,13 @@ pub fn home_dir() -> Option<PathBuf> {
551
551
552
552
#[ cfg( any( target_os = "android" ,
553
553
target_os = "ios" ,
554
- target_os = "nacl" ) ) ]
554
+ target_os = "nacl" ,
555
+ target_os = "emscripten" ) ) ]
555
556
unsafe fn fallback ( ) -> Option < OsString > { None }
556
557
#[ cfg( not( any( target_os = "android" ,
557
558
target_os = "ios" ,
558
- target_os = "nacl" ) ) ) ]
559
+ target_os = "nacl" ,
560
+ target_os = "emscripten" ) ) ) ]
559
561
unsafe fn fallback ( ) -> Option < OsString > {
560
562
#[ cfg( not( target_os = "solaris" ) ) ]
561
563
unsafe fn getpwduid_r ( me : libc:: uid_t , passwd : & mut libc:: passwd ,
Original file line number Diff line number Diff line change @@ -81,8 +81,7 @@ impl Thread {
81
81
}
82
82
83
83
#[ cfg( any( target_os = "linux" ,
84
- target_os = "android" ,
85
- target_os = "emscripten" ) ) ]
84
+ target_os = "android" ) ) ]
86
85
pub fn set_name ( name : & CStr ) {
87
86
const PR_SET_NAME : libc:: c_int = 15 ;
88
87
// pthread wrapper only appeared in glibc 2.12, so we use syscall
@@ -118,9 +117,9 @@ impl Thread {
118
117
name. as_ptr ( ) as * mut libc:: c_void ) ;
119
118
}
120
119
}
121
- #[ cfg( any( target_env = "newlib" , target_os = "solaris" ) ) ]
120
+ #[ cfg( any( target_env = "newlib" , target_os = "solaris" , target_os = "emscripten" ) ) ]
122
121
pub fn set_name ( _name : & CStr ) {
123
- // Newlib and Illumos has no way to set a thread name.
122
+ // Newlib, Illumos and Emscripten have no way to set a thread name.
124
123
}
125
124
126
125
pub fn sleep ( dur : Duration ) {
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ pub const unwinder_private_data_size: usize = 2;
60
60
pub const unwinder_private_data_size: usize = 2 ;
61
61
62
62
#[ cfg( target_arch = "asmjs" ) ]
63
- // FIXME: Copied from arm. Need to confirm.
64
63
pub const unwinder_private_data_size: usize = 20 ;
65
64
66
65
#[ repr( C ) ]
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ mod rusti {
24
24
target_os = "dragonfly" ,
25
25
target_os = "netbsd" ,
26
26
target_os = "openbsd" ,
27
- target_os = "solaris" ) ) ]
27
+ target_os = "solaris" ,
28
+ target_os = "emscripten" ) ) ]
28
29
mod m {
29
30
#[ main]
30
31
#[ cfg( target_arch = "x86" ) ]
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ struct Outer {
42
42
target_os = "dragonfly" ,
43
43
target_os = "netbsd" ,
44
44
target_os = "openbsd" ,
45
- target_os = "solaris" ) ) ]
45
+ target_os = "solaris" ,
46
+ target_os = "emscripten" ) ) ]
46
47
mod m {
47
48
#[ cfg( target_arch = "x86" ) ]
48
49
pub mod m {
You can’t perform that action at this time.
0 commit comments