From a2071c258e92a81a48fcae4fb5d7138d746feeac Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 24 Nov 2016 11:17:36 -0500 Subject: [PATCH] Remove unnecessary dependencies on libc in various utilities. --- src/basename/Cargo.toml | 1 - src/basename/basename.rs | 2 -- src/cut/Cargo.toml | 1 - src/cut/cut.rs | 2 -- src/dircolors/Cargo.toml | 1 - src/dircolors/dircolors.rs | 1 - src/du/Cargo.toml | 1 - src/du/du.rs | 1 - src/echo/Cargo.toml | 1 - src/echo/echo.rs | 2 -- src/expand/Cargo.toml | 1 - src/expand/expand.rs | 1 - src/factor/Cargo.toml | 1 - src/factor/factor.rs | 1 - src/fold/Cargo.toml | 1 - src/fold/fold.rs | 2 -- src/mktemp/Cargo.toml | 1 - src/mktemp/mktemp.rs | 1 - src/paste/Cargo.toml | 1 - src/paste/paste.rs | 1 - src/printenv/Cargo.toml | 1 - src/printenv/printenv.rs | 1 - src/pwd/Cargo.toml | 1 - src/pwd/pwd.rs | 1 - src/realpath/Cargo.toml | 1 - src/realpath/realpath.rs | 1 - src/relpath/Cargo.toml | 1 - src/relpath/relpath.rs | 1 - src/rm/Cargo.toml | 1 - src/rm/rm.rs | 1 - src/rmdir/Cargo.toml | 1 - src/rmdir/rmdir.rs | 1 - src/seq/Cargo.toml | 1 - src/seq/seq.rs | 1 - src/shuf/Cargo.toml | 1 - src/shuf/shuf.rs | 1 - src/sleep/Cargo.toml | 1 - src/sleep/sleep.rs | 1 - src/sort/Cargo.toml | 1 - src/sort/sort.rs | 1 - src/split/Cargo.toml | 1 - src/split/split.rs | 1 - src/stdbuf/Cargo.toml | 1 - src/stdbuf/stdbuf.rs | 1 - src/sum/Cargo.toml | 1 - src/sum/sum.rs | 1 - src/tac/Cargo.toml | 1 - src/tac/tac.rs | 1 - src/truncate/Cargo.toml | 1 - src/truncate/truncate.rs | 1 - src/tsort/Cargo.toml | 1 - src/tsort/tsort.rs | 1 - src/unexpand/Cargo.toml | 1 - src/unexpand/unexpand.rs | 1 - src/wc/Cargo.toml | 1 - src/wc/wc.rs | 1 - src/yes/Cargo.toml | 1 - src/yes/yes.rs | 1 - 58 files changed, 62 deletions(-) diff --git a/src/basename/Cargo.toml b/src/basename/Cargo.toml index 33ab7e06f..ed09cbd86 100644 --- a/src/basename/Cargo.toml +++ b/src/basename/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_basename" path = "basename.rs" [dependencies] -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/basename/basename.rs b/src/basename/basename.rs index f4bb3977f..b12380cb1 100644 --- a/src/basename/basename.rs +++ b/src/basename/basename.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -extern crate libc; - #[macro_use] extern crate uucore; diff --git a/src/cut/Cargo.toml b/src/cut/Cargo.toml index 5f976f7ab..5297c3b7f 100644 --- a/src/cut/Cargo.toml +++ b/src/cut/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_cut" path = "cut.rs" [dependencies] -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/cut/cut.rs b/src/cut/cut.rs index cd2f303df..8e5249216 100644 --- a/src/cut/cut.rs +++ b/src/cut/cut.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -extern crate libc; - #[macro_use] extern crate uucore; diff --git a/src/dircolors/Cargo.toml b/src/dircolors/Cargo.toml index 790f48a6d..61cac633a 100644 --- a/src/dircolors/Cargo.toml +++ b/src/dircolors/Cargo.toml @@ -9,7 +9,6 @@ path = "dircolors.rs" [dependencies] glob = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/dircolors/dircolors.rs b/src/dircolors/dircolors.rs index f35e13404..c5a0ae29f 100644 --- a/src/dircolors/dircolors.rs +++ b/src/dircolors/dircolors.rs @@ -8,7 +8,6 @@ // file that was distributed with this source code. // -extern crate libc; extern crate glob; #[macro_use] diff --git a/src/du/Cargo.toml b/src/du/Cargo.toml index dfba4477f..9ccc48274 100644 --- a/src/du/Cargo.toml +++ b/src/du/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_du" path = "du.rs" [dependencies] -libc = "*" time = "*" uucore = { path="../uucore" } diff --git a/src/du/du.rs b/src/du/du.rs index 22798714a..424a702fa 100644 --- a/src/du/du.rs +++ b/src/du/du.rs @@ -11,7 +11,6 @@ #![allow(non_snake_case)] -extern crate libc; extern crate time; #[macro_use] diff --git a/src/echo/Cargo.toml b/src/echo/Cargo.toml index 741466dca..7abd802d0 100644 --- a/src/echo/Cargo.toml +++ b/src/echo/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_echo" path = "echo.rs" [dependencies] -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/echo/echo.rs b/src/echo/echo.rs index 551bf5303..198a43bdb 100644 --- a/src/echo/echo.rs +++ b/src/echo/echo.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -extern crate libc; - #[macro_use] extern crate uucore; diff --git a/src/expand/Cargo.toml b/src/expand/Cargo.toml index 5eeab0a34..cab048be0 100644 --- a/src/expand/Cargo.toml +++ b/src/expand/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_expand" path = "expand.rs" [dependencies] -libc = "*" unicode-width = "*" getopts = "*" uucore = { path="../uucore" } diff --git a/src/expand/expand.rs b/src/expand/expand.rs index 2ccfb376d..4624b21e8 100644 --- a/src/expand/expand.rs +++ b/src/expand/expand.rs @@ -11,7 +11,6 @@ * file that was distributed with this source code. */ -extern crate libc; extern crate unicode_width; extern crate getopts; diff --git a/src/factor/Cargo.toml b/src/factor/Cargo.toml index e3d505c14..c13b64065 100644 --- a/src/factor/Cargo.toml +++ b/src/factor/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_factor" path = "factor.rs" [dependencies] -libc = "*" rand = "*" uucore = { path="../uucore" } diff --git a/src/factor/factor.rs b/src/factor/factor.rs index f58f12300..134acf6ca 100644 --- a/src/factor/factor.rs +++ b/src/factor/factor.rs @@ -13,7 +13,6 @@ * that was distributed with this source code. */ -extern crate libc; extern crate rand; #[macro_use] diff --git a/src/fold/Cargo.toml b/src/fold/Cargo.toml index 45e78a77e..e54a6c427 100644 --- a/src/fold/Cargo.toml +++ b/src/fold/Cargo.toml @@ -8,7 +8,6 @@ name = "uu_fold" path = "fold.rs" [dependencies] -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/fold/fold.rs b/src/fold/fold.rs index b51a23451..dcee258f8 100644 --- a/src/fold/fold.rs +++ b/src/fold/fold.rs @@ -9,8 +9,6 @@ * file that was distributed with this source code. */ -extern crate libc; - #[macro_use] extern crate uucore; diff --git a/src/mktemp/Cargo.toml b/src/mktemp/Cargo.toml index 63f0f9580..14e618cec 100644 --- a/src/mktemp/Cargo.toml +++ b/src/mktemp/Cargo.toml @@ -10,7 +10,6 @@ path = "mktemp.rs" [dependencies] uucore = { path="../uucore" } getopts = "*" -libc = "*" rand = "0.3" tempfile = "*" diff --git a/src/mktemp/mktemp.rs b/src/mktemp/mktemp.rs index 497241891..990edeb74 100644 --- a/src/mktemp/mktemp.rs +++ b/src/mktemp/mktemp.rs @@ -10,7 +10,6 @@ // extern crate getopts; -extern crate libc; extern crate tempfile; extern crate rand; diff --git a/src/paste/Cargo.toml b/src/paste/Cargo.toml index 17187e52b..e1d6cad06 100644 --- a/src/paste/Cargo.toml +++ b/src/paste/Cargo.toml @@ -9,7 +9,6 @@ path = "paste.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/paste/paste.rs b/src/paste/paste.rs index 7e4eb6af0..cb3f807f9 100644 --- a/src/paste/paste.rs +++ b/src/paste/paste.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/printenv/Cargo.toml b/src/printenv/Cargo.toml index a469e26e0..87282aa8f 100644 --- a/src/printenv/Cargo.toml +++ b/src/printenv/Cargo.toml @@ -9,7 +9,6 @@ path = "printenv.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/printenv/printenv.rs b/src/printenv/printenv.rs index 10ba49e4e..d38033013 100644 --- a/src/printenv/printenv.rs +++ b/src/printenv/printenv.rs @@ -12,7 +12,6 @@ /* last synced with: printenv (GNU coreutils) 8.13 */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/pwd/Cargo.toml b/src/pwd/Cargo.toml index fbf0c8b60..d927c3fd7 100644 --- a/src/pwd/Cargo.toml +++ b/src/pwd/Cargo.toml @@ -9,7 +9,6 @@ path = "pwd.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/pwd/pwd.rs b/src/pwd/pwd.rs index 08788043e..4a2cd5485 100644 --- a/src/pwd/pwd.rs +++ b/src/pwd/pwd.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/realpath/Cargo.toml b/src/realpath/Cargo.toml index 0028e042c..1b7e62df9 100644 --- a/src/realpath/Cargo.toml +++ b/src/realpath/Cargo.toml @@ -9,7 +9,6 @@ path = "realpath.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/realpath/realpath.rs b/src/realpath/realpath.rs index d8a41bdb8..6cfa63f13 100644 --- a/src/realpath/realpath.rs +++ b/src/realpath/realpath.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/relpath/Cargo.toml b/src/relpath/Cargo.toml index 0c3779a4e..fd993334a 100644 --- a/src/relpath/Cargo.toml +++ b/src/relpath/Cargo.toml @@ -9,7 +9,6 @@ path = "relpath.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/relpath/relpath.rs b/src/relpath/relpath.rs index 9c67baced..74cb47f7b 100644 --- a/src/relpath/relpath.rs +++ b/src/relpath/relpath.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/rm/Cargo.toml b/src/rm/Cargo.toml index 32802457d..25017bee2 100644 --- a/src/rm/Cargo.toml +++ b/src/rm/Cargo.toml @@ -9,7 +9,6 @@ path = "rm.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/rm/rm.rs b/src/rm/rm.rs index 69cf6d7d7..3dbee442f 100644 --- a/src/rm/rm.rs +++ b/src/rm/rm.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/rmdir/Cargo.toml b/src/rmdir/Cargo.toml index b0f36d8f9..8e2d8f561 100644 --- a/src/rmdir/Cargo.toml +++ b/src/rmdir/Cargo.toml @@ -9,7 +9,6 @@ path = "rmdir.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/rmdir/rmdir.rs b/src/rmdir/rmdir.rs index 04da57639..95a6b0b57 100644 --- a/src/rmdir/rmdir.rs +++ b/src/rmdir/rmdir.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/seq/Cargo.toml b/src/seq/Cargo.toml index 78f267934..4b3e1e873 100644 --- a/src/seq/Cargo.toml +++ b/src/seq/Cargo.toml @@ -9,7 +9,6 @@ path = "seq.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/seq/seq.rs b/src/seq/seq.rs index 9c1a45417..95898d9ad 100644 --- a/src/seq/seq.rs +++ b/src/seq/seq.rs @@ -4,7 +4,6 @@ // TODO: Support -f flag extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/shuf/Cargo.toml b/src/shuf/Cargo.toml index 349688d5a..aa79d3e80 100644 --- a/src/shuf/Cargo.toml +++ b/src/shuf/Cargo.toml @@ -9,7 +9,6 @@ path = "shuf.rs" [dependencies] getopts = "*" -libc = "*" rand = "*" uucore = { path="../uucore" } diff --git a/src/shuf/shuf.rs b/src/shuf/shuf.rs index 54bab2bc0..a5598c199 100644 --- a/src/shuf/shuf.rs +++ b/src/shuf/shuf.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; extern crate rand; #[macro_use] diff --git a/src/sleep/Cargo.toml b/src/sleep/Cargo.toml index daa715a25..eb7cd1e6f 100644 --- a/src/sleep/Cargo.toml +++ b/src/sleep/Cargo.toml @@ -9,7 +9,6 @@ path = "sleep.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/sleep/sleep.rs b/src/sleep/sleep.rs index 9a3f4bd70..812f4b431 100644 --- a/src/sleep/sleep.rs +++ b/src/sleep/sleep.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/sort/Cargo.toml b/src/sort/Cargo.toml index f8de86672..bfff3658a 100644 --- a/src/sort/Cargo.toml +++ b/src/sort/Cargo.toml @@ -9,7 +9,6 @@ path = "sort.rs" [dependencies] getopts = "*" -libc = "*" semver = "*" itertools = "*" uucore = { path="../uucore" } diff --git a/src/sort/sort.rs b/src/sort/sort.rs index 47d7d4943..f8a4f6510 100644 --- a/src/sort/sort.rs +++ b/src/sort/sort.rs @@ -12,7 +12,6 @@ #![allow(dead_code)] extern crate getopts; -extern crate libc; extern crate semver; #[macro_use] diff --git a/src/split/Cargo.toml b/src/split/Cargo.toml index 76140863b..e34c2aec3 100644 --- a/src/split/Cargo.toml +++ b/src/split/Cargo.toml @@ -9,7 +9,6 @@ path = "split.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/split/split.rs b/src/split/split.rs index 42df0486b..a652ada24 100644 --- a/src/split/split.rs +++ b/src/split/split.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/stdbuf/Cargo.toml b/src/stdbuf/Cargo.toml index 71b955055..7acb6b969 100644 --- a/src/stdbuf/Cargo.toml +++ b/src/stdbuf/Cargo.toml @@ -9,7 +9,6 @@ path = "stdbuf.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/stdbuf/stdbuf.rs b/src/stdbuf/stdbuf.rs index bf0921b55..994b555c5 100644 --- a/src/stdbuf/stdbuf.rs +++ b/src/stdbuf/stdbuf.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/sum/Cargo.toml b/src/sum/Cargo.toml index 057e9e0f2..aeda3133a 100644 --- a/src/sum/Cargo.toml +++ b/src/sum/Cargo.toml @@ -9,7 +9,6 @@ path = "sum.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/sum/sum.rs b/src/sum/sum.rs index 2b8db82c0..d95afa798 100644 --- a/src/sum/sum.rs +++ b/src/sum/sum.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/tac/Cargo.toml b/src/tac/Cargo.toml index f7e6d500b..3e59a4b48 100644 --- a/src/tac/Cargo.toml +++ b/src/tac/Cargo.toml @@ -9,7 +9,6 @@ path = "tac.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/tac/tac.rs b/src/tac/tac.rs index 53d4bb034..da5c7ab29 100644 --- a/src/tac/tac.rs +++ b/src/tac/tac.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/truncate/Cargo.toml b/src/truncate/Cargo.toml index 59683dbe9..02d2ad1c4 100644 --- a/src/truncate/Cargo.toml +++ b/src/truncate/Cargo.toml @@ -9,7 +9,6 @@ path = "truncate.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/truncate/truncate.rs b/src/truncate/truncate.rs index bd906d61f..a4e2309b7 100644 --- a/src/truncate/truncate.rs +++ b/src/truncate/truncate.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/tsort/Cargo.toml b/src/tsort/Cargo.toml index b9e7be45d..bbc20fbd1 100644 --- a/src/tsort/Cargo.toml +++ b/src/tsort/Cargo.toml @@ -9,7 +9,6 @@ path = "tsort.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/tsort/tsort.rs b/src/tsort/tsort.rs index 59e8602e1..a5c875965 100644 --- a/src/tsort/tsort.rs +++ b/src/tsort/tsort.rs @@ -11,7 +11,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/unexpand/Cargo.toml b/src/unexpand/Cargo.toml index 5745cd512..377f90aa9 100644 --- a/src/unexpand/Cargo.toml +++ b/src/unexpand/Cargo.toml @@ -9,7 +9,6 @@ path = "unexpand.rs" [dependencies] getopts = "*" -libc = "*" unicode-width = "*" uucore = { path="../uucore" } diff --git a/src/unexpand/unexpand.rs b/src/unexpand/unexpand.rs index 85cdd8468..556f97119 100644 --- a/src/unexpand/unexpand.rs +++ b/src/unexpand/unexpand.rs @@ -12,7 +12,6 @@ */ extern crate getopts; -extern crate libc; extern crate unicode_width; #[macro_use] diff --git a/src/wc/Cargo.toml b/src/wc/Cargo.toml index 932920339..166a79749 100644 --- a/src/wc/Cargo.toml +++ b/src/wc/Cargo.toml @@ -9,7 +9,6 @@ path = "wc.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/wc/wc.rs b/src/wc/wc.rs index 42106826d..880e68515 100644 --- a/src/wc/wc.rs +++ b/src/wc/wc.rs @@ -10,7 +10,6 @@ */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore; diff --git a/src/yes/Cargo.toml b/src/yes/Cargo.toml index 45d768094..0a34042d8 100644 --- a/src/yes/Cargo.toml +++ b/src/yes/Cargo.toml @@ -9,7 +9,6 @@ path = "yes.rs" [dependencies] getopts = "*" -libc = "*" uucore = { path="../uucore" } [[bin]] diff --git a/src/yes/yes.rs b/src/yes/yes.rs index adfd91365..49643c732 100644 --- a/src/yes/yes.rs +++ b/src/yes/yes.rs @@ -12,7 +12,6 @@ /* last synced with: yes (GNU coreutils) 8.13 */ extern crate getopts; -extern crate libc; #[macro_use] extern crate uucore;