expand: use printable_string instead of hard-coding implementation

function                                             old     new   delta
expand_main                                          709     690     -19

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
do not fail build if MAXSYMLINKS isn't defined

This is needed for, eg, hurd, which is known to have no constraints.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
killall5: return 2 if no processes got killed

function                                             old     new   delta
kill_main                                            943     992     +49

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
kill[all[5]]: code shrink

function                                             old     new   delta
kill_main                                            992     947     -45

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
wget: user-friendly fallback to http

GNU wget: wget google.com // ok
bb before: wget google.com // wget: not an http or ftp url

function                                             old     new   delta
parse_url                                            317     339     +22

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
hostname: do not use gethostbyname() for "hostname -s"

There's no reason to call gethostbyname() on the value returned
by uname() when asked just for a short name of a host.  This may
also be wrong, when uname is set to one value, but in /etc/hosts
(or elsewhere) the "canonical" name is different.  This is often
the case for localhost entry in /etc/hosts:

  127.0.0.1     localhost       myname

With this content of /etc/hosts, and uname being set to myname,
busybox hostname -s will return localhost, while regular
hostname utility returns myname.

Fix this by not calling gethostbyname() for the simple
'hostname -s' use.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
sed: accept s///i as a synonym for s///I ("ignore case")

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
build system: fix make gconfig

Was getting "undefined reference to symbol 'dlsym@@GLIBC_2.2.5'".

Signed-off-by: Daniel Borca <dborca@yahoo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite: fix false positives for du

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
adduser: check whether run with no USERNAME. Closes 6728

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite: disable tests for no longer supported bbox-specific date formats

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
fix failures found by randomconfig builds

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite: remove forgotten debug hack

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Bump version to 1.22.0

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Start 1.23.0 development cycle

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
platform.h: undef HAVE_STRCHRNUL only on correct versions of FreeBSD

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
grep: fix two bugs with -w

Unfortunately, with !EXTRA_COMPAT, "grep -w ^str" still erroneously matches "strstr".

function                                             old     new   delta
grep_file                                           1499    1510     +11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash: in bash compat mode, always export $SHLVL

function                                             old     new   delta
ash_main                                            1437    1442      +5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Another FreeBSD fix from Matthias Andree

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb: FreeBSD fix for B<num> baud rate constants not fitting into a short.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>