mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
Merge pull request #526 from ebfe/fix-build
Fix build with rust nightly
This commit is contained in:
commit
c8607e79ff
5 changed files with 6 additions and 5 deletions
3
Makefile
3
Makefile
|
@ -202,7 +202,7 @@ define CRATE_BUILD
|
||||||
-include $(BUILDDIR)/$(1).d
|
-include $(BUILDDIR)/$(1).d
|
||||||
|
|
||||||
$(BUILDDIR)/$($(1)_RLIB): $(SRCDIR)/$(1)/$(1).rs | $(BUILDDIR) deps
|
$(BUILDDIR)/$($(1)_RLIB): $(SRCDIR)/$(1)/$(1).rs | $(BUILDDIR) deps
|
||||||
$(RUSTC) $(RUSTCLIBFLAGS) --extern libc=$(BUILDDIR)/liblibc.rlib --extern time=$(BUILDDIR)/libtime.rlib --extern regex=$(BUILDDIR)/libregex.rlib --extern serialize=$(BUILDDIR)/librustc-serialize.rlib --crate-type rlib --emit link,dep-info $$< --out-dir $(BUILDDIR)
|
$(RUSTC) $(RUSTCLIBFLAGS) --extern libc=$(BUILDDIR)/liblibc.rlib --extern time=$(BUILDDIR)/libtime.rlib --extern rand=$(BUILDDIR)/librand.rlib --extern regex=$(BUILDDIR)/libregex.rlib --extern serialize=$(BUILDDIR)/librustc-serialize.rlib --crate-type rlib --emit link,dep-info $$< --out-dir $(BUILDDIR)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Aliases build rule
|
# Aliases build rule
|
||||||
|
@ -258,6 +258,7 @@ $(BUILDDIR)/stdbuf: $(BUILDDIR)/libstdbuf.$(DYLIB_EXT)
|
||||||
# Dependencies
|
# Dependencies
|
||||||
$(BUILDDIR)/.rust-crypto: | $(BUILDDIR)
|
$(BUILDDIR)/.rust-crypto: | $(BUILDDIR)
|
||||||
cd $(BASEDIR)/deps/rust-crypto && $(CARGO) build --release
|
cd $(BASEDIR)/deps/rust-crypto && $(CARGO) build --release
|
||||||
|
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/librand*.rlib $(BUILDDIR)/librand.rlib
|
||||||
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/librustc-serialize*.rlib $(BUILDDIR)/librustc-serialize.rlib
|
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/librustc-serialize*.rlib $(BUILDDIR)/librustc-serialize.rlib
|
||||||
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/libtime*.rlib $(BUILDDIR)/libtime.rlib
|
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/libtime*.rlib $(BUILDDIR)/libtime.rlib
|
||||||
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/liblibc*.rlib $(BUILDDIR)/liblibc.rlib
|
cp -r $(BASEDIR)/deps/rust-crypto/target/release/deps/liblibc*.rlib $(BUILDDIR)/liblibc.rlib
|
||||||
|
|
2
deps/regex
vendored
2
deps/regex
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit e12e57ed188dd4ed655bb7f3690e666317a7d198
|
Subproject commit 90ef3c4b58140d672ed97cdf45e59592d122368e
|
2
deps/rust-crypto
vendored
2
deps/rust-crypto
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 093f3918c8d77281050bba35a261fd8c56d2a866
|
Subproject commit 6e70e4b98137f247f8d30b698c179d2f973dc23b
|
|
@ -535,7 +535,7 @@ impl<'a> Iterator for WordSplit<'a> {
|
||||||
let mut word_nchars = 0;
|
let mut word_nchars = 0;
|
||||||
self.position =
|
self.position =
|
||||||
match self.string[word_start..]
|
match self.string[word_start..]
|
||||||
.find(|&mut: x: char| if !x.is_whitespace() { word_nchars += char_width(x); false } else { true }) {
|
.find(|x: char| if !x.is_whitespace() { word_nchars += char_width(x); false } else { true }) {
|
||||||
None => self.length,
|
None => self.length,
|
||||||
Some(s) => s + word_start
|
Some(s) => s + word_start
|
||||||
};
|
};
|
||||||
|
|
|
@ -72,7 +72,7 @@ fn detect_algo(program: &str, matches: &getopts::Matches) -> (&'static str, Box<
|
||||||
"sha512sum" => ("SHA512", Box::new(Sha512::new()) as Box<Digest>),
|
"sha512sum" => ("SHA512", Box::new(Sha512::new()) as Box<Digest>),
|
||||||
_ => {
|
_ => {
|
||||||
{
|
{
|
||||||
let mut set_or_crash = |&mut: n, val| -> () {
|
let mut set_or_crash = |n, val| -> () {
|
||||||
if alg.is_some() { crash!(1, "You cannot combine multiple hash algorithms!") };
|
if alg.is_some() { crash!(1, "You cannot combine multiple hash algorithms!") };
|
||||||
name = n;
|
name = n;
|
||||||
alg = Some(val);
|
alg = Some(val);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue