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