Skip to content

Commit 2920c87

Browse files
committed
Fix more stuff on redox
1 parent 5dd5b44 commit 2920c87

File tree

4 files changed

+57
-45
lines changed

4 files changed

+57
-45
lines changed

Cargo.lock

Lines changed: 35 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vm/Cargo.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ sha2 = "0.8"
2424
sha3 = "0.8"
2525
blake2 = "0.8"
2626

27-
num-complex = { version = "0.2", features = ["serde"] }
28-
num-bigint = { version = "0.2", features = ["serde"] }
29-
num-traits = "=0.2.6"
30-
num-integer = "0.1.39"
31-
num-rational = "0.2.1"
32-
num-iter = "0.1"
27+
num-complex = { version = "0.2.2", features = ["serde"] }
28+
num-bigint = { version = "0.2.3", features = ["serde"] }
29+
num-traits = "0.2.8"
30+
num-integer = "0.1.41"
31+
num-rational = "0.2.2"
32+
num-iter = "0.1.39"
3333
rand = "0.5"
3434
log = "0.3"
3535
rustpython-derive = {path = "../derive", version = "0.1.0"}
@@ -43,7 +43,7 @@ regex = "1"
4343
rustc_version_runtime = "0.1.*"
4444
statrs = "0.10.0"
4545
caseless = "0.2.1"
46-
chrono = "=0.4.7"
46+
chrono = "=0.4.6"
4747
unicode-segmentation = "1.2.1"
4848
unicode-xid = "0.1.0"
4949
lazy_static = "^1.0.1"
@@ -83,6 +83,3 @@ num_cpus = "1.0"
8383

8484
[target."cfg(windows)".dependencies]
8585
kernel32-sys = "0.2.2"
86-
87-
[target.'cfg(target_arch = "wasm32")'.dependencies]
88-
wasm-bindgen = "0.2"

vm/src/stdlib/os.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,12 @@ fn getgroups() -> nix::Result<Vec<Gid>> {
293293
}
294294
}
295295

296-
#[cfg(any(target_os = "linux", target_os = "redox", target_os = "android"))]
296+
#[cfg(any(target_os = "linux", target_os = "android"))]
297+
use nix::unistd::getgroups;
298+
299+
#[cfg(target_os = "redox")]
297300
fn getgroups() -> nix::Result<Vec<Gid>> {
298-
nix::unistd::getgroups()
301+
unimplemented!("redox getgroups")
299302
}
300303

301304
#[cfg(unix)]
@@ -1229,7 +1232,15 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) ->
12291232
"openpty" => ctx.new_rustfunc(os_openpty),
12301233
});
12311234

1232-
#[cfg(not(any(target_os = "macos", target_os = "android", target_os = "redox")))]
1235+
// cfg taken from nix
1236+
#[cfg(any(
1237+
target_os = "dragonfly",
1238+
target_os = "freebsd",
1239+
all(
1240+
target_os = "linux",
1241+
not(any(target_env = "musl", target_arch = "mips", target_arch = "mips64"))
1242+
)
1243+
))]
12331244
extend_module!(vm, module, {
12341245
"SEEK_DATA" => ctx.new_int(Whence::SeekData as i8),
12351246
"SEEK_HOLE" => ctx.new_int(Whence::SeekHole as i8)

vm/src/stdlib/signal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn signal(signalnum: i32, handler: PyObjectRef, vm: &VirtualMachine) -> PyResult
5858
if old == SIG_ERR {
5959
return Err(vm.new_os_error("Failed to set signal".to_string()));
6060
}
61-
#[cfg(unix)]
61+
#[cfg(all(unix, not(target_os = "redox")))]
6262
{
6363
extern "C" {
6464
fn siginterrupt(sig: i32, flag: i32);

0 commit comments

Comments
 (0)