File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed
library/std/src/sys/pal/windows Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -594,3 +594,34 @@ mod wship6 {
594
594
}
595
595
}
596
596
}
597
+
598
+ #[ cfg( target_vendor = "rust9x" ) ]
599
+ compat_fn_with_fallback ! {
600
+ pub static KERNEL32 : & CStr = c"kernel32" => { load: false , unicows: false } ;
601
+ // >= Vista / Server 2008
602
+ // https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-initializeprocthreadattributelist
603
+ pub fn InitializeProcThreadAttributeList (
604
+ lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST ,
605
+ dwattributecount: u32 ,
606
+ dwflags: u32 ,
607
+ lpsize: * mut usize
608
+ ) -> BOOL {
609
+ unimplemented!( )
610
+ }
611
+ // >= Vista / Server 2008
612
+ pub fn UpdateProcThreadAttribute (
613
+ lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST ,
614
+ dwflags: u32 ,
615
+ attribute: usize ,
616
+ lpvalue: * const core:: ffi:: c_void,
617
+ cbsize: usize ,
618
+ lppreviousvalue: * mut core:: ffi:: c_void,
619
+ lpreturnsize: * const usize
620
+ ) -> BOOL {
621
+ unimplemented!( )
622
+ }
623
+ // >= Vista / Server 2008
624
+ pub fn DeleteProcThreadAttributeList ( lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST ) {
625
+ unimplemented!( )
626
+ }
627
+ }
Original file line number Diff line number Diff line change @@ -358,7 +358,15 @@ impl Command {
358
358
let mut proc_thread_attribute_list;
359
359
let mut si_ex;
360
360
361
- if !self . proc_thread_attributes . is_empty ( ) {
361
+ #[ allow( unused) ]
362
+ let mut proc_thread_addributes_supported = true ;
363
+ #[ cfg( target_vendor = "rust9x" ) ]
364
+ {
365
+ proc_thread_addributes_supported =
366
+ c:: InitializeProcThreadAttributeList :: available ( ) . is_some ( ) ;
367
+ }
368
+
369
+ if !self . proc_thread_attributes . is_empty ( ) && proc_thread_addributes_supported {
362
370
si. cb = mem:: size_of :: < c:: STARTUPINFOEXW > ( ) as u32 ;
363
371
flags |= c:: EXTENDED_STARTUPINFO_PRESENT ;
364
372
You can’t perform that action at this time.
0 commit comments