aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-24 22:52:21 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-24 22:52:21 +0100
commit6b01b71e8370c58787318d5fca06db2074f95c55 (patch)
tree1f2fff69f5004a6fe66872434e1a25827588f1a7
parent9f93d621925966c22ee51fdcb5def8e131596f9b (diff)
downloadbusybox-w32-6b01b71e8370c58787318d5fca06db2074f95c55.tar.gz
busybox-w32-6b01b71e8370c58787318d5fca06db2074f95c55.tar.bz2
busybox-w32-6b01b71e8370c58787318d5fca06db2074f95c55.zip
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/Config.in3
-rw-r--r--coreutils/ls.c13
-rw-r--r--include/unarchive.h4
-rw-r--r--shell/hush.c2
-rw-r--r--util-linux/fbset.c8
5 files changed, 13 insertions, 17 deletions
diff --git a/archival/Config.in b/archival/Config.in
index cf771f96c..fb79c7bca 100644
--- a/archival/Config.in
+++ b/archival/Config.in
@@ -281,7 +281,8 @@ config FEATURE_TAR_NOPRESERVE_TIME
281 default n 281 default n
282 depends on TAR 282 depends on TAR
283 help 283 help
284 With this option busybox supports GNU tar -m (do not preserve time) option. 284 With this option busybox supports GNU tar -m
285 (do not preserve time) option.
285 286
286endif #tar 287endif #tar
287 288
diff --git a/coreutils/ls.c b/coreutils/ls.c
index e7544474b..6c898b793 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -509,15 +509,10 @@ static int sortcmp(const void *a, const void *b)
509 509
510 /* Make dif fit into an int */ 510 /* Make dif fit into an int */
511 if (sizeof(dif) > sizeof(int)) { 511 if (sizeof(dif) > sizeof(int)) {
512 if (sizeof(dif) == sizeof(int)*2) { 512 enum { BITS_TO_SHIFT = 8 * (sizeof(dif) - sizeof(int)) };
513 /* typical on many arches */ 513 /* shift leaving only "int" worth of bits */
514 if (dif != 0) { 514 if (dif != 0) {
515 dif = 1 | (int)((uoff_t)dif >> (sizeof(int)*8)); 515 dif = 1 | (int)((uoff_t)dif >> BITS_TO_SHIFT);
516 }
517 } else {
518 while ((dif & ~(off_t)INT_MAX) != 0) {
519 dif >>= (sizeof(int)*8 / 2);
520 }
521 } 516 }
522 } 517 }
523 518
diff --git a/include/unarchive.h b/include/unarchive.h
index e3afb8af9..8bfc92cbe 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -53,14 +53,14 @@ typedef struct archive_handle_t {
53 off_t offset; 53 off_t offset;
54 54
55 /* Archiver specific. Can make it a union if it ever gets big */ 55 /* Archiver specific. Can make it a union if it ever gets big */
56#if ENABLE_TAR 56#if ENABLE_TAR || ENABLE_DPKG || ENABLE_DPKG_DEB
57 smallint tar__end; 57 smallint tar__end;
58# if ENABLE_FEATURE_TAR_GNU_EXTENSIONS 58# if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
59 char* tar__longname; 59 char* tar__longname;
60 char* tar__linkname; 60 char* tar__linkname;
61# endif 61# endif
62#endif 62#endif
63#if ENABLE_CPIO 63#if ENABLE_CPIO || ENABLE_RPM2CPIO || ENABLE_RPM
64 uoff_t cpio__blocks; 64 uoff_t cpio__blocks;
65 struct hardlinks_t *cpio__hardlinks_to_create; 65 struct hardlinks_t *cpio__hardlinks_to_create;
66 struct hardlinks_t *cpio__created_hardlinks; 66 struct hardlinks_t *cpio__created_hardlinks;
diff --git a/shell/hush.c b/shell/hush.c
index 810009ae8..9a9b5bb91 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1516,13 +1516,13 @@ static char* FAST_FUNC endofname(const char *name)
1516 } 1516 }
1517 return p; 1517 return p;
1518} 1518}
1519#endif
1519 1520
1520static void FAST_FUNC set_local_var_from_halves(const char *name, const char *val) 1521static void FAST_FUNC set_local_var_from_halves(const char *name, const char *val)
1521{ 1522{
1522 char *var = xasprintf("%s=%s", name, val); 1523 char *var = xasprintf("%s=%s", name, val);
1523 set_local_var(var, /*flags:*/ 0, /*lvl:*/ 0, /*ro:*/ 0); 1524 set_local_var(var, /*flags:*/ 0, /*lvl:*/ 0, /*ro:*/ 0);
1524} 1525}
1525#endif
1526 1526
1527 1527
1528/* 1528/*
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index dc3245baf..2769a371a 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -189,17 +189,17 @@ static const struct cmdoptions_t {
189#endif 189#endif
190}; 190};
191 191
192#if ENABLE_FEATURE_FBSET_READMODE
193/* taken from linux/fb.h */ 192/* taken from linux/fb.h */
194enum { 193enum {
195 FB_VMODE_INTERLACED = 1, /* interlaced */
196 FB_VMODE_DOUBLE = 2, /* double scan */
197 FB_SYNC_HOR_HIGH_ACT = 1, /* horizontal sync high active */ 194 FB_SYNC_HOR_HIGH_ACT = 1, /* horizontal sync high active */
198 FB_SYNC_VERT_HIGH_ACT = 2, /* vertical sync high active */ 195 FB_SYNC_VERT_HIGH_ACT = 2, /* vertical sync high active */
196#if ENABLE_FEATURE_FBSET_READMODE
197 FB_VMODE_INTERLACED = 1, /* interlaced */
198 FB_VMODE_DOUBLE = 2, /* double scan */
199 FB_SYNC_EXT = 4, /* external sync */ 199 FB_SYNC_EXT = 4, /* external sync */
200 FB_SYNC_COMP_HIGH_ACT = 8, /* composite sync high active */ 200 FB_SYNC_COMP_HIGH_ACT = 8, /* composite sync high active */
201};
202#endif 201#endif
202};
203 203
204#if ENABLE_FEATURE_FBSET_READMODE 204#if ENABLE_FEATURE_FBSET_READMODE
205static void ss(uint32_t *x, uint32_t flag, char *buf, const char *what) 205static void ss(uint32_t *x, uint32_t flag, char *buf, const char *what)