mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Fix build.
This commit is contained in:
parent
25297ec2b3
commit
96346761ab
4 changed files with 6 additions and 7 deletions
4
Makefile
4
Makefile
|
@ -16,7 +16,7 @@ command = sh -c '$(1)'
|
||||||
|
|
||||||
# Main exe build rule
|
# Main exe build rule
|
||||||
define EXE_BUILD
|
define EXE_BUILD
|
||||||
build/$(1): $(1)/$(1).rs
|
build/$(1): build $(1)/$(1).rs
|
||||||
$(call command,$(RUSTC) $(RUSTCFLAGS) -o build/$(1) $(1)/$(1).rs)
|
$(call command,$(RUSTC) $(RUSTCFLAGS) -o build/$(1) $(1)/$(1).rs)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ test_$(1): tmp/$(1)_test build/$(1)
|
||||||
$(call command,tmp/$(1)_test)
|
$(call command,tmp/$(1)_test)
|
||||||
|
|
||||||
tmp/$(1)_test: $(1)/test.rs
|
tmp/$(1)_test: $(1)/test.rs
|
||||||
$(RUSTC) $(RUSTCFLAGS) -o tmp/$(1)_test $(1)/test.rs
|
$(call command,$(RUSTC) $(RUSTCFLAGS) --test -o tmp/$(1)_test $(1)/test.rs)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Main rules
|
# Main rules
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#[link(name="cat", vers="1.0.0", author="Seldaek")];
|
#[link(name="cat", vers="1.0.0", author="Seldaek")];
|
||||||
#[feature(managed_boxes)]
|
#[feature(managed_boxes)];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the uutils coreutils package.
|
* This file is part of the uutils coreutils package.
|
||||||
|
|
6
env/env.rs
vendored
6
env/env.rs
vendored
|
@ -75,7 +75,7 @@ fn main() {
|
||||||
|
|
||||||
if wait_cmd {
|
if wait_cmd {
|
||||||
// we still accept NAME=VAL here but not other options
|
// we still accept NAME=VAL here but not other options
|
||||||
let mut sp = opt.splitn_iter('=', 1);
|
let mut sp = opt.splitn('=', 1);
|
||||||
let name = sp.next();
|
let name = sp.next();
|
||||||
let value = sp.next();
|
let value = sp.next();
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ fn main() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut chars = opt.iter();
|
let mut chars = opt.chars();
|
||||||
chars.next();
|
chars.next();
|
||||||
|
|
||||||
for c in chars {
|
for c in chars {
|
||||||
|
@ -146,7 +146,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// is it a NAME=VALUE like opt ?
|
// is it a NAME=VALUE like opt ?
|
||||||
let mut sp = opt.splitn_iter('=', 1);
|
let mut sp = opt.splitn('=', 1);
|
||||||
let name = sp.next();
|
let name = sp.next();
|
||||||
let value = sp.next();
|
let value = sp.next();
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ extern {
|
||||||
pub fn getpwuid(uid: libc::c_int) -> *c_passwd;
|
pub fn getpwuid(uid: libc::c_int) -> *c_passwd;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[fixed_stack_segment]
|
|
||||||
unsafe fn getusername() -> ~str {
|
unsafe fn getusername() -> ~str {
|
||||||
let passwd: *c_passwd = getpwuid(geteuid());
|
let passwd: *c_passwd = getpwuid(geteuid());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue