File tree 2 files changed +40
-1
lines changed
library/std/src/sys/pal/windows
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -607,3 +607,34 @@ mod wship6 {
607
607
}
608
608
}
609
609
}
610
+
611
+ #[ cfg( target_vendor = "rust9x" ) ]
612
+ compat_fn_with_fallback ! {
613
+ pub static KERNEL32 : & CStr = c"kernel32" => { load: false , unicows: false } ;
614
+ // >= Vista / Server 2008
615
+ // https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-initializeprocthreadattributelist
616
+ pub fn InitializeProcThreadAttributeList (
617
+ lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST ,
618
+ dwattributecount: u32 ,
619
+ dwflags: u32 ,
620
+ lpsize: * mut usize
621
+ ) -> BOOL {
622
+ unimplemented!( )
623
+ }
624
+ // >= Vista / Server 2008
625
+ pub fn UpdateProcThreadAttribute (
626
+ lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST ,
627
+ dwflags: u32 ,
628
+ attribute: usize ,
629
+ lpvalue: * const core:: ffi:: c_void,
630
+ cbsize: usize ,
631
+ lppreviousvalue: * mut core:: ffi:: c_void,
632
+ lpreturnsize: * const usize
633
+ ) -> BOOL {
634
+ unimplemented!( )
635
+ }
636
+ // >= Vista / Server 2008
637
+ pub fn DeleteProcThreadAttributeList ( lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST ) {
638
+ unimplemented!( )
639
+ }
640
+ }
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