File tree Expand file tree Collapse file tree 6 files changed +13
-11
lines changed Expand file tree Collapse file tree 6 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ pub fn init() {
8383 }
8484 }
8585
86- #[ cfg( not( target_os = "nacl" ) ) ]
86+ #[ cfg( not( any ( target_os = "nacl" , target_os = "emscripten" ) ) ) ]
8787 unsafe fn reset_sigpipe ( ) {
8888 assert ! ( signal( libc:: SIGPIPE , libc:: SIG_IGN ) != !0 ) ;
8989 }
90- #[ cfg( target_os = "nacl" ) ]
90+ #[ cfg( any ( target_os = "nacl" , target_os = "emscripten" ) ) ]
9191 unsafe fn reset_sigpipe ( ) { }
9292}
9393
Original file line number Diff line number Diff line change @@ -551,11 +551,13 @@ pub fn home_dir() -> Option<PathBuf> {
551551
552552 #[ cfg( any( target_os = "android" ,
553553 target_os = "ios" ,
554- target_os = "nacl" ) ) ]
554+ target_os = "nacl" ,
555+ target_os = "emscripten" ) ) ]
555556 unsafe fn fallback ( ) -> Option < OsString > { None }
556557 #[ cfg( not( any( target_os = "android" ,
557558 target_os = "ios" ,
558- target_os = "nacl" ) ) ) ]
559+ target_os = "nacl" ,
560+ target_os = "emscripten" ) ) ) ]
559561 unsafe fn fallback ( ) -> Option < OsString > {
560562 #[ cfg( not( target_os = "solaris" ) ) ]
561563 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 {
8181 }
8282
8383 #[ cfg( any( target_os = "linux" ,
84- target_os = "android" ,
85- target_os = "emscripten" ) ) ]
84+ target_os = "android" ) ) ]
8685 pub fn set_name ( name : & CStr ) {
8786 const PR_SET_NAME : libc:: c_int = 15 ;
8887 // pthread wrapper only appeared in glibc 2.12, so we use syscall
@@ -118,9 +117,9 @@ impl Thread {
118117 name. as_ptr ( ) as * mut libc:: c_void ) ;
119118 }
120119 }
121- #[ cfg( any( target_env = "newlib" , target_os = "solaris" ) ) ]
120+ #[ cfg( any( target_env = "newlib" , target_os = "solaris" , target_os = "emscripten" ) ) ]
122121 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.
124123 }
125124
126125 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;
6060pub const unwinder_private_data_size: usize = 2 ;
6161
6262#[ cfg( target_arch = "asmjs" ) ]
63- // FIXME: Copied from arm. Need to confirm.
6463pub const unwinder_private_data_size: usize = 20 ;
6564
6665#[ repr( C ) ]
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ mod rusti {
2424 target_os = "dragonfly" ,
2525 target_os = "netbsd" ,
2626 target_os = "openbsd" ,
27- target_os = "solaris" ) ) ]
27+ target_os = "solaris" ,
28+ target_os = "emscripten" ) ) ]
2829mod m {
2930 #[ main]
3031 #[ cfg( target_arch = "x86" ) ]
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ struct Outer {
4242 target_os = "dragonfly" ,
4343 target_os = "netbsd" ,
4444 target_os = "openbsd" ,
45- target_os = "solaris" ) ) ]
45+ target_os = "solaris" ,
46+ target_os = "emscripten" ) ) ]
4647mod m {
4748 #[ cfg( target_arch = "x86" ) ]
4849 pub mod m {
You can’t perform that action at this time.
0 commit comments