From 67b23e6043d8e2b30b0bf3bc105b8583c2a26db5 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 3 Oct 2006 21:00:06 +0000 Subject: getopt_ulflags -> getopt32. It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit. --- coreutils/du.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'coreutils/du.c') diff --git a/coreutils/du.c b/coreutils/du.c index 3cc935553..1452e5883 100644 --- a/coreutils/du.c +++ b/coreutils/du.c @@ -153,7 +153,7 @@ int du_main(int argc, char **argv) int slink_depth_save; int print_final_total; char *smax_print_depth; - unsigned long opt; + unsigned opt; #ifdef CONFIG_FEATURE_DU_DEFUALT_BLOCKSIZE_1K if (getenv("POSIXLY_CORRECT")) { /* TODO - a new libbb function? */ @@ -172,8 +172,8 @@ int du_main(int argc, char **argv) * ignore -a. This is consistent with -s being equivalent to -d 0. */ #ifdef CONFIG_FEATURE_HUMAN_READABLE - bb_opt_complementally = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s"; - opt = bb_getopt_ulflags(argc, argv, "aHkLsx" "d:" "lc" "hm", &smax_print_depth); + opt_complementary = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s"; + opt = getopt32(argc, argv, "aHkLsx" "d:" "lc" "hm", &smax_print_depth); if((opt & (1 << 9))) { /* -h opt */ disp_hr = 0; @@ -187,8 +187,8 @@ int du_main(int argc, char **argv) disp_hr = KILOBYTE; } #else - bb_opt_complementally = "H-L:L-H:s-d:d-s"; - opt = bb_getopt_ulflags(argc, argv, "aHkLsx" "d:" "lc", &smax_print_depth); + opt_complementary = "H-L:L-H:s-d:d-s"; + opt = getopt32(argc, argv, "aHkLsx" "d:" "lc", &smax_print_depth); #if !defined CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K if((opt & (1 << 2))) { /* -k opt */ -- cgit v1.2.3