make it work with musl (the _nox target does not link the screen module that wouldn't build)

This commit is contained in:
2020-10-11 22:56:48 +02:00
parent 4cf24f0382
commit 7efa04054c
7 changed files with 255 additions and 1 deletions
+13 -1
View File
@@ -9,6 +9,7 @@ use crsn::sexp::SourcePosition;
use std::convert::TryFrom;
use std::io;
use crsn::asm::instr::cond::Flag;
use std::fmt;
mod console {
use std::{io};
@@ -98,7 +99,7 @@ mod console {
}
}
#[derive(Debug, Clone)]
#[derive(Clone)]
pub struct StdioOps {
old_tio: Option<libc::termios>,
hdl_stdin : Value,
@@ -107,6 +108,17 @@ pub struct StdioOps {
hdl_stdout_raw : Value,
}
impl fmt::Debug for StdioOps {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("StdioOps")
.field("hdl_stdin", &format_args!("0x{:08x}", self.hdl_stdin))
.field("hdl_stdin_raw", &format_args!("0x{:08x}", self.hdl_stdin_raw))
.field("hdl_stdout", &format_args!("0x{:08x}", self.hdl_stdout))
.field("hdl_stdout_raw", &format_args!("0x{:08x}", self.hdl_stdout_raw))
.finish()
}
}
impl StdioOps {
pub fn new() -> Box<dyn CrsnExtension> {
Box::new(Self {