Commit graph

50 commits

Author SHA1 Message Date
Roy Ivy III
bf6368269c refactor/polish ~ fix cargo clippy complaints (unneeded parens) 2020-01-27 21:33:50 -06:00
Alex Lyon
b73a664677 Split off uucore into its own repository 2019-05-12 22:42:20 -07:00
Vinzent Steinberg
e46e3594d2 Fix more clippy warnings and remove redundant 'static 2018-09-04 14:33:36 +02:00
dependabot[bot]
c66dd59489
Bump libc from 0.2.39 to 0.2.42
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.39 to 0.2.42.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.39...0.2.42)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-11 17:13:54 +00:00
Ian Douglas Scott
727d4843b8
Change static to const 2018-03-16 20:14:50 -07:00
Ian Douglas Scott
187006f0d3
test: handle symlinks in main match 2018-03-16 18:47:11 -07:00
Ian Douglas Scott
301b9002ce
Port test to Redox 2018-03-16 18:39:53 -07:00
Alex Lyon
880a4973c1 Format everything using rustfmt 2018-03-12 01:20:58 -07:00
Alex Lyon
75f11e9635
Handle SIGPIPE correctly and autogenerate main() for each util 2017-12-08 15:05:07 -08:00
Joshua Miller
e8073d2596 pin dependencies 2017-07-15 15:16:09 -05:00
Lei Zhang
aaa7274b63 Remove unnecessary dependencies of getopts & libc for utilities. 2016-11-17 17:43:31 -05:00
Michael Gehring
a2944e06db Fix clippy warnings 2016-01-06 09:36:20 +01:00
Joseph Crail
b90d253584 Refactor and simplify build for utilities.
For coreutils, there are two build artifacts:

  1. multicall executable (each utility is a separate static library)
  2. individual utilities (still separate library with main wrapper)

To avoid namespace collision, each utility crate is defined as
"uu_{CMD}". The end user only sees the original utility name. This
simplifies build.rs.

Also, the thin wrapper for the main() function is no longer contained in
the crate. It has been separated into a dedicated file. This was
necessary to work around Cargo's need for the crate name attribute to
match the name in the respective Cargo.toml.
2015-12-07 21:56:45 -05:00
Joseph Crail
1c7da36f76 Remove unused imports and macro attribute. 2015-11-29 20:23:01 -05:00
Joseph Crail
012414c49f test: fix namespace and broken test
I separated test's main() into a separate file to override Cargo's
requirement for matching crate names. I had to update the build command
to use a special extern reference for test.

Fixes issues caused by #728.
2015-11-27 15:35:20 -05:00
Joseph Crail
d4e0ea41a3 Fix namespace collision for test.
To avoid linking issues with Rust's libtest, the crate for the test
utility was changed to 'uutest'. However, the user doesn't need to see
this so a few hoops were jumped through to make this transparent.

I also updated the make rules to build the individual features first and
then uutils. This makes 'make && make test' look more organized.
2015-11-27 01:54:18 -05:00
Joseph Crail
ca1074201f Split utility files into separate library.
Everything in src/common has been moved to src/uucore. This is defined
as a Cargo library, instead of directly included. This gives us
flexibility to make the library an external crate in the future.

Fixes #717.
2015-11-24 22:20:27 -05:00
Nathan Ross
502957dc3e use cargo idioms to manage dependency resolution and compilation 2015-11-23 02:04:15 -05:00
Nathan Ross
b20b2cca19 update uses of libc 0.1.x and deprecated stdlib uses 2015-11-23 02:04:15 -05:00
Carlos Liam
87d14978e9 Clean whitespace
Remove leading newlines and replace lines containing only whitespace
with empty lines
2015-10-06 12:04:46 -04:00
Michael Gehring
9d8abbcb06 Basic Cargo build
Builds the uutils multicall binary containing all utils (except stdbuf)
by default. To only build a subset
    `cargo --no-default-features --features <utils>`
can be used.

Whats missing is building the standalone binaries and a mechanism to
automatically disable the build of unix only utils on windows.
2015-08-28 21:12:30 +02:00
Joseph Crail
9d84890c89 Convert to byte vec w/o using deprecated methods. 2015-08-11 21:45:11 -04:00
Peter Atashian
47f82f0de2 Various Windows fixes
Improve handling of unicode on Windows
Disable a few crates on Windows that abuse unix APIs too much

Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-19 20:25:48 -04:00
kwantam
cab4f8d570 fix test 2015-05-07 18:12:32 -04:00
Michael Gehring
bce3382fd2 Closure syntax 2015-03-08 19:06:04 +01:00
Michael Gehring
eb6594cc91 CString::from_slice -> CString::new 2015-02-22 13:59:57 +01:00
Michael Gehring
e7b647171f os::set_exit_status(isize) -> env::set_exit_status(i32) 2015-02-22 13:59:12 +01:00
Michael Gehring
d3ff46d0c7 Drop deprecated 'libc' feature flag 2015-02-06 14:10:07 +01:00
Michael Gehring
5e70473a2b std::path -> std::old_path 2015-02-06 13:45:45 +01:00
Michael Gehring
3eb5a814a3 Fix most unstable feature warnings 2015-02-03 23:54:37 +01:00
Michael Gehring
d89d9ca73b Various functions in std::str return Result instead of Option now 2015-02-03 22:32:30 +01:00
Michael Gehring
d187dc574b std::io -> std::old_io 2015-01-29 08:45:37 +01:00
Michael Gehring
fbdf04c072 Replace deprecated slice_{to,from} with slicing syntax 2015-01-24 10:46:28 +01:00
Arcterus
41cc268df8 Make dependency info usable for test, sync, true, and false 2015-01-10 13:00:15 -08:00
Michael Gehring
4d6cbfa393 Disable unstable warnings for now 2015-01-10 20:44:56 +01:00
Michael Gehring
782fad4667 int/uint -> isize/usize 2015-01-10 20:40:37 +01:00
Michael Gehring
8cd7295a19 test, tr, tsort: fix build 2015-01-10 20:40:37 +01:00
Michael Gehring
f2d49f4bb6 Make uumain return isize everywhere 2015-01-10 14:07:39 +01:00
Michael Gehring
9aef41b8f6 << precedence 2015-01-08 14:50:03 +01:00
Michael Gehring
074a58eafd deriving is now called derive 2015-01-08 14:50:03 +01:00
Santiago Lapresta
d142168365 Fix deprecation warnings on latest nightlies 2014-12-25 19:55:32 +01:00
Haitao Li
b9e0ce0b1c Fix build with rustc master
* core::slice::Items renamd to core::slice::Iter
* from_utf8 returns Result instead of Option
* Unique type per fn item. Rust Issue #19891
2014-12-24 20:55:32 +11:00
Michael Gehring
842cc8b14c Fix build with rust master 2014-12-11 07:51:37 +01:00
Michael Gehring
cd409c6d3f Update for namespaced enums 2014-11-19 21:58:16 +01:00
Michael Gehring
e7b247de0b Fix deprecation warnings 2014-11-08 07:45:33 +01:00
Michael Gehring
3ecf41cffe Drop BigInt support from test 2014-10-21 14:13:44 +02:00
Arcterus
88ad6710f5 test: fix -a and -o by using operator precedence 2014-10-17 17:08:18 -07:00
Arcterus
0e4e8f14d6 Make test pass all of the Busybox tests 2014-10-06 22:16:07 -07:00
Arcterus
ba0177c824 Allow test to be checked by the Busybox test suite 2014-09-27 20:17:34 -07:00
Arcterus
b7f4bd01bc Move all of the utils into src 2014-07-20 20:20:55 -07:00