Skip to content
Snippets Groups Projects
Verified Commit e3fd644b authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Compile on non-redox platforms but return ENOSYS for all system calls

parent 43c562a9
No related branches found
No related tags found
No related merge requests found
[package]
name = "redox_syscall"
version = "0.1.55"
version = "0.1.56"
description = "A Rust library to access raw Redox system calls"
license = "MIT"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
......
use super::error::{Error, Result, ENOSYS};
pub unsafe fn syscall0(_a: usize) -> Result<usize> {
Err(Error::new(ENOSYS))
}
pub unsafe fn syscall1(_a: usize, _b: usize) -> Result<usize> {
Err(Error::new(ENOSYS))
}
// Clobbers all registers - special for clone
pub unsafe fn syscall1_clobber(_a: usize, _b: usize) -> Result<usize> {
Err(Error::new(ENOSYS))
}
pub unsafe fn syscall2(_a: usize, _b: usize, _c: usize) -> Result<usize> {
Err(Error::new(ENOSYS))
}
pub unsafe fn syscall3(_a: usize, _b: usize, _c: usize, _d: usize) -> Result<usize> {
Err(Error::new(ENOSYS))
}
pub unsafe fn syscall4(_a: usize, _b: usize, _c: usize, _d: usize, _e: usize) -> Result<usize> {
Err(Error::new(ENOSYS))
}
pub unsafe fn syscall5(_a: usize, _b: usize, _c: usize, _d: usize, _e: usize, _f: usize)
-> Result<usize> {
Err(Error::new(ENOSYS))
}
#![cfg(target_os = "redox")]
#![feature(asm)]
#![feature(const_fn)]
#![cfg_attr(not(test), no_std)]
......@@ -15,22 +14,26 @@ pub use self::io::*;
pub use self::number::*;
pub use self::scheme::*;
#[cfg(target_arch = "arm")]
#[cfg(all(target_os = "redox", target_arch = "arm"))]
#[path="arch/arm.rs"]
mod arch;
#[cfg(target_arch = "aarch64")]
#[cfg(all(target_os = "redox", target_arch = "aarch64"))]
#[path="arch/aarch64.rs"]
mod arch;
#[cfg(target_arch = "x86")]
#[cfg(all(target_os = "redox", target_arch = "x86"))]
#[path="arch/x86.rs"]
mod arch;
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_os = "redox", target_arch = "x86_64"))]
#[path="arch/x86_64.rs"]
mod arch;
#[cfg(not(target_os = "redox"))]
#[path="arch/nonredox.rs"]
mod arch;
/// Function definitions
pub mod call;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment