@@ -144,14 +144,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
144
144
let result = this. getpid ( ) ?;
145
145
this. write_scalar ( result, dest) ?;
146
146
}
147
-
148
- "sysconf" => {
149
- let [ val] =
150
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
151
- let result = this. sysconf ( val) ?;
152
- this. write_scalar ( result, dest) ?;
153
- }
154
-
155
147
// File descriptors
156
148
"read" => {
157
149
let [ fd, buf, count] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
@@ -792,24 +784,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
792
784
// We do not support forking, so there is nothing to do here.
793
785
this. write_null ( dest) ?;
794
786
}
795
- <<<<<<< HEAD
796
- =======
797
- "strerror_r" | "__xpg_strerror_r" => {
798
- let [ errnum , buf, buflen ] = this. check_shim ( abi , Conv :: C , link_name , args ) ?;
799
- let errnum = this. read_scalar ( errnum ) ?;
800
- let buf = this. read_pointer ( buf ) ?;
801
- let buflen = this. read_target_usize ( buflen ) ?;
802
787
803
- let error = this. try_errnum_to_io_error ( errnum ) ?;
804
- let formatted = match error {
805
- Some ( err ) => format ! ( "{err}" ) ,
806
- None => format ! ( "<unknown errnum in strerror_r: {errnum}>" ) ,
807
- } ;
808
- let ( complete , _ ) = this. write_os_str_to_c_str ( OsStr :: new ( & formatted ) , buf , buflen ) ?;
809
- let ret = if complete { 0 } else { this. eval_libc_i32( "ERANGE" ) } ;
810
- this. write_int( ret, dest) ?;
811
- }
812
- >>>>>>> 3750176 dbd2 ( Pass FnAbi to find_mir_or_eval_fn)
813
788
"getentropy" => {
814
789
// This function is non-standard but exists with the same signature and behavior on
815
790
// Linux, macOS, FreeBSD and Solaris/Illumos.
@@ -840,7 +815,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
840
815
841
816
"strerror_r" => {
842
817
let [ errnum, buf, buflen] =
843
- this. check_shim( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
818
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
844
819
let result = this. strerror_r ( errnum, buf, buflen) ?;
845
820
this. write_scalar ( result, dest) ?;
846
821
}
0 commit comments