| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The POSIX specification says:
There are three kinds of comments: blank lines, empty lines, and
a <number-sign> ('#') and all following characters up to the first
unescaped <newline> character.
Most implementations don't treat '#' in a macro expansion or a command
line as the start of a comment. POSIX doesn't mention either of these
exceptions.
Permit the exceptions as a non-POSIX extension.
|
| |
| |
| |
| |
| | |
Use $? instead of $^ in the test for .WAIT. bmake supports .WAIT
but not $^.
|
| |
| |
| |
| |
| |
| |
| | |
Since vfork(2) is never used in busybox-w32 there's no need to
declare it. Doing so provokes clang to issue a warning.
(GitHub issue #239)
|
| |
| |
| |
| |
| |
| |
| | |
Austin Group defect report 1549 has been accepted. It requires
that an escaped newline inside a macro expansion in a command is
replaced by a space. Other escaped newlines in commands are
left in place, as before.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Upstream changes to the embedded_scripts and mkconfigs scripts
resulted in busybox-w32 failing to build with MSYS2.
bzip2 in MSYS2 detects stdout redirected to /dev/null as a terminal
and returns a non-zero exit status. Since the test is only for
the existence of bzip2, not its functionality, even an exit status
of 1 is OK. Only fail if the exit status is 127.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make some adjustments to the build system to allow busybox-w32
to be built with w64devkit:
- Strip drive prefix from CURDIR in Makefile to avoid confusing
make with colons.
- Limit file redirection to a subshell in the usage_compressed and
embedded_scripts scripts. Otherwise it isn't possible to move
the open generated file on Windows.
- Change the option tests in Kbuild.include to allow for /dev/null
not existing on Windows.
- Create host binaries without a '.exe' extension. Otherwise they're
rebuilt more often than necessary.
- Modify split-include.c to allow for Windows' popen() not expanding
wildcards.
(GitHub issue #239)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 605972390 (win32: handle Unix-style absolute paths for
executables) added special treatment of paths for executables
starting with a slash. Such paths are absolute on Unix but are
relative to the current drive on Windows. On reflection this
commit did more than necessary. Later commits provided special
treatment only for paths starting with locations traditionally
used to contain binaries on Unix. This is probably sufficient.
Problems introduced by commit 605972390 include:
- If the current drive isn't the system drive tab completion of a
command starting with a slash confusingly references the system
drive.
- Building busybox-w32 with w64devkit fails on drives other than
the system drive.
Revert the changes introduced by commit 605972390.
This saves 192 bytes.
(GitHub issue #239)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Building on Windows using w64devkit resulted in a new warning in
timegm(3). The compiler didn't like a reference to the unnamed
temporary in:
if (!is_leap) is_leap = &(int){0};
is_leap is always non-NULL in the limited version of the code used
here so the offending line can simply be removed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As reported in https://github.com/skeeto/w64devkit/issues/35
there's a problem creating Windows resources using the native
version of `windres`.
Avoid passing arguments to `windres` that it can't handle by
stringizing the version string locally in resource.rc.
(GitHub issue #239)
|
| | |
|
| |
| |
| |
| |
| | |
The code to handle the modifiers for 'directory part' and 'filename
part' has been updated to support the $+ internal macro.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Austin Group defect report 1437 has been accepted. It describes
the special targets .NOTPARALLEL and .WAIT which are used to
influence the behaviour of parallel builds.
Since parallel builds aren't implemented in here they actually don't
't have much effect.
- For completeness they're flagged as special targets.
- .WAIT should be allowed as a prerequisite.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Austin Group defect report 337 has been accepted, thus making
macro assignment from the output of a shell command (!=) a
POSIX 202X feature.
This was previously implemented as a non-POSIX extension.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Austin Group defect reports 514 and 1520 have both been accepted.
Together these introduce the internal macros $+ and $^:
- $+ lists all prerequisites, with duplicates retained;
- $^ lists all prerequisites, with duplicates removed.
$^ had already been implemented as a non-POSIX extension, it now
becomes a POSIX 202X extension. $+ has been added as a POSIX
202X extension.
Neither of the above defect reports mentions how $? should handle
duplicate prerequisites. In POSIX mode duplicates are retained.
Removal of duplicates is implemented as a non-POSIX extension to
match existing practice in other versions of make.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The sleep applet can call xfunc_die() in a variety of circumstances.
This makes the code unsuitable for use as a shell builtin. Disable
it in the default configuration.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Upstream BusyBox has supported fractional arguments to 'read -t'
since 2017. For some reason it was never enabled in busybox-w32.
Costs 48-80 bytes.
(GitHub issue #269)
|
| |
| |
| |
| |
| |
| |
| | |
If xxd is run with '-r' but no '-s' the value of opt_s passed to
reverse() is uninitialised.
This patch has been submitted upstream but hasn't been applied yet.
|
| |
| |
| |
| | |
The new 'tree' applet uses scandir(3) and has been disabled by default.
|
|\| |
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
tls_xread_record 629 645 +16
.rodata 105167 105179 +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 28/0) Total: 28 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
show_usage_if_dash_dash_help 72 79 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
sleepcmd - 10 +10
builtintab 352 360 +8
.rodata 105264 105271 +7
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 25/0) Total: 25 bytes
Signed-off-by: Shawn Landden <shawnlandden@tutanota.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add 128-bit width if the compiler provides the needed type.
function old new delta
devmem_main 405 464 +59
.rodata 109025 109043 +18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 77/0) Total: 77 bytes
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
tree_print 396 420 +24
.rodata 105251 105266 +15
tree_main 86 91 +5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 44/0) Total: 44 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
xxd_main 1076 1439 +363
.rodata 105239 105251 +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 375/0) Total: 375 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
xxd_main 888 1076 +188
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Running an applet with '--help' as its only argument is treated
as a special case. If additional arguments follow '--help' the
behaviour is inconsistent:
- applets which call single_argv() print help and do nothing else;
- applets which call getopt() report "unrecognized option '--help'"
and print help anyway;
- expr says "expr: syntax error" and doesn't print help;
- printenv silently ignores '--help', prints any other variables
and doesn't print help;
- realpath says "--help: No such file or directory", prints the path
of any other files and doesn't print help.
If the first argument is '--help' ignore any other arguments and print
help. This is more consistent and most likely what the user wanted.
See also commit 6bdfbc4cb (libbb: fix '--help' handling in
FEATURE_SH_NOFORK=y).
function old new delta
show_usage_if_dash_dash_help 75 69 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-6) Total: -6 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
subevalvar 1566 1564 -2
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| | |
This matches udhcpc for IPv4.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
d6_listen_socket - 150 +150
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Busybox vi provides the 'ZZ' command to save and close
the similar 'ZQ' command just exits without saving.
function old new delta
do_cmd 4222 4244 +22
Signed-off-by: Grob Grobmann <grobgrobmann@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Henrique Rodrigues <henrique.rodrigues@ist.utl.pt>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Patch by soeren@soeren-tempel.net
The idx variable points to a value in the stack string (as managed
by STPUTC). STPUTC may resize this stack string via realloc(3). If
this happens, the idx pointer needs to be updated. Otherwise,
dereferencing idx may result in a use-after free.
function old new delta
subevalvar 1562 1566 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Patch by Alex Gorinson <algore3698@gmail.com>
function old new delta
evalvar 477 495 +18
varvalue 603 618 +15
subevalvar 1557 1572 +15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 48/0) Total: 48 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
sort_main 851 856 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
compare_keys 848 862 +14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
option_to_env 686 694 +8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fixes https://bugs.busybox.net/show_bug.cgi?id=14781
function old new delta
evaluate 3343 3357 +14
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
md5_sha1_sum_main 496 501 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The line editing code and ash disagree when the current directory
is changed to a symbolic link:
~ $ mkdir real
~ $ ln -s real link
~ $ cd link
~/real $ pwd
/home/rmyf36/link
Note the prompt says we're in ~/real. Bash does:
[rmy@random ~]$ cd link
[rmy@random link]$ pwd
/home/rmyf36/link
Ash uses the name supplied by the user while the line editing code
calls getcwd(3). The discrepancy can be avoided by fetching the
value of PWD from ash.
Hush calls getcwd(3) when the directory is changed
so there's no disagreement with the line editing code.
There is no standard how shells should handle cd'ing into
symlinks.
function old new delta
parse_and_put_prompt 838 869 +31
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds the tree program to list directories and files in a tree structure.
function old new delta
tree_print - 343 +343
scandir64 - 330 +330
scandir - 330 +330
tree_main - 86 +86
.rodata 105150 105228 +78
packed_usage 34511 34557 +46
alphasort64 - 31 +31
alphasort - 31 +31
strcoll - 5 +5
applet_names 2801 2806 +5
applet_main 1616 1620 +4
applet_suid 101 102 +1
applet_install_loc 202 203 +1
------------------------------------------------------------------------------
(add/remove: 11/0 grow/shrink: 6/0 up/down: 1291/0) Total: 1291 bytes
Signed-off-by: Roger Knecht <rknecht@pm.me>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unlike GNU tar upstream BusyBox tar treats all errors as fatal.
Failure to create a symlink on Windows is very likely due to a
lack of the required privilege. busybox-w32 therefore treats this
case as a non-fatal error and, as far as possible, continues
extracting files.
However:
- The inconsistency of this behaviour caused some confusion.
- busybox-w32 tar didn't return an error status when a non-fatal
error was encountered, unlike GNU tar.
Change the implementation so extraction continues when symlink
creation fails but the error report is deferred until all of the
archive has been processed. Only one error is reported and it's
treated as fatal.
Saves 48-64 bytes.
(GitHub issue #265)
|