@@ -144,14 +144,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
144144 let result = this. getpid ( ) ?;
145145 this. write_scalar ( result, dest) ?;
146146 }
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-
155147 // File descriptors
156148 "read" => {
157149 let [ fd, buf, count] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
@@ -792,24 +784,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
792784 // We do not support forking, so there is nothing to do here.
793785 this. write_null ( dest) ?;
794786 }
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 ) ?;
802787
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)
813788 "getentropy" => {
814789 // This function is non-standard but exists with the same signature and behavior on
815790 // Linux, macOS, FreeBSD and Solaris/Illumos.
@@ -840,7 +815,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
840815
841816 "strerror_r" => {
842817 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) ?;
844819 let result = this. strerror_r ( errnum, buf, buflen) ?;
845820 this. write_scalar ( result, dest) ?;
846821 }
0 commit comments