aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * start-stop-daemon: implement option -O|--outputLouai Al-Khanji2023-11-071-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If specified redirect command stdout and stderr to given pathname. function old new delta start_stop_daemon_main 1130 1186 +56 start_stop_daemon_longopts 164 173 +9 packed_usage 34653 34656 +3 .rodata 105384 105386 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 70/0) Total: 70 bytes Signed-off-by: Louai Al-Khanji <louai@astranis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sleep: Update docPetr Vorel2023-11-071-7/+8
| | | | | | | | | | | | | | | | | | 4c20d9f2b removed FEATURE_FLOAT_SLEEP option, thus since then there are only two variants. Fixes: 4c20d9f2b ("extend fractional duration support to "top -d N.N" and "timeout"") Signed-off-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * start-stop-daemon: update comment, no code changesDenys Vlasenko2023-11-071-3/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * start-stop-daemon: add -d DIR chdir optionejaaskel2023-11-073-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add option to change the running directory before starting the process. This can be done using -d or --chdir options. Add also test cases to start-stop-daemon to test out the directory change option. function old new delta packed_usage 34602 34648 +46 start_stop_daemon_main 1107 1130 +23 start_stop_daemon_longopts 156 164 +8 .rodata 105382 105384 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 79/0) Total: 79 bytes Signed-off-by: ejaaskel <esa.jaaskela@suomi24.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * start-stop-daemon: fix --help: -K or -S is requiredDenys Vlasenko2023-11-071-10/+36
| | | | | | | | | | | | | | | | | | | | function old new delta .rodata 105381 105382 +1 packed_usage 34638 34602 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 1/-36) Total: -35 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: Avoid leaking uninitialized/stale dataRuss Dill2023-10-042-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed a commit in connman: "gdhcp: Avoid leaking stack data via unitiialized variable" [1] Since gdhcp is just BusyBox udhcp with the serial numbers filed off, I checked if BusyBox udhcp has a related issue. The issue is that the get_option logic assumes any data within the memory area of the buffer is "valid". This reduces the complexity of the function at the cost of reading past the end of the actually received data in the case of specially crafted packets. This is not a problem for the udhcp_recv_kernel_packet data path as the entire memory area is zeroed. However, d4/d6_recv_raw_packet does not zero the memory. Note that a related commit [2] is not required as we are zeroing any data that can be read by the get_option function. [1] https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 [2] https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=58d397ba74873384aee449690a9070bacd5676fa function old new delta d4_recv_raw_packet 484 497 +13 d6_recv_raw_packet 216 228 +12 .rodata 105390 105381 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 25/-9) Total: 16 bytes Signed-off-by: Russ Dill <russ.dill@gmail.com> Cc: Colin Wee <cwee@tesla.com> Cc: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * syslogd: fix breakage caused by "daemonize _after_ init" changeDenys Vlasenko2023-10-031-4/+5
| | | | | | | | | | | | | | | | | | | | function old new delta syslogd_init 1007 1140 +133 create_socket 143 - -143 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 133/-143) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: implement -E; do not reorder -f and -eDenys Vlasenko2023-10-021-48/+65
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta awk_main 843 891 +48 next_input_file 243 261 +18 packed_usage 34631 34638 +7 .rodata 105391 105390 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 73/-1) Total: 72 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * install: Fix chown resetting suid/sgid bits from chmodNero2023-10-021-7/+9
| | | | | | | | | | | | | | | | | | | | Since Linux 2.2.13, chown(2) resets the suid/gid bits for all users. This patch changes the ordering so that chmod gets called after chown. This behavior follows GNU coreutils. Signed-off-by: Nero <nero@w1r3.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sleep: fix "sleep -- ARGS"Denys Vlasenko2023-10-025-19/+19
| | | | | | | | | | | | | | | | | | | | | | function old new delta sleep_main 116 119 +3 printf_main 860 837 -23 single_argv 50 25 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-48) Total: -45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: only search PATH for compressorRon Yorston2023-11-143-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mingw_fork_compressor() uses CreateProcess() to run the compressor program. This will often be an instance of BusyBox, but since the xv and lzma applets in BusyBox don't support compression it can be an external program. It was intended that the external program should be found using PATH. However, CreateProcess() looks in various other places before trying PATH. In particular, it first looks in the directory of the current executable, then in the current directory of the process. This can result in the wrong xz.exe or lzma.exe being found. Perform an explicit PATH search and force CreateProcess() to use the result. This change only affects the search for a compressor. The same problem also affects other uses of our popen(3) emulation. These may be addressed in future. Costs 64-80 bytes. (GitHub issue #376)
* | iconv: fix incorrect fixRon Yorston2023-11-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Part of commit 412c2cab62 (iconv: minor fixes) was intended to avoid having to enter ^Z twice to signal EOF when input was coming from the console. Unfortunately there were unintended consequences. Use a different method to detect EOF. Costs 32-48 bytes. (GitHuv issue #374)
* | lineedit: normalise HOME for use in promptRon Yorston2023-10-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | The code to replace the user's home directory with '~' in the prompt didn't allow for the possibility of the HOME environment variable having backslashes in the path. Convert backslashes to forward slashes in HOME. This isn't necessary if the home directory is obtained from getpwuid(3) as it's already converted there. Adds 24-32 bytes.
* | make: stricter checks for c:/path filenamesRon Yorston2023-10-241-6/+9
| | | | | | | | | | | | | | | | | | | | When checking target names or looking for a target rule be more strict about the form of Windows paths allowed. Alter the error message when neither a target rule or macro assignment has been detected. Adds 88-96 bytes.
* | win32: avoid terminal weirdness induced by GradleRon Yorston2023-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Commit 87a3ddc06 (win32: avoid terminal weirdness induced by Gradle?) correctly diagnosed the problem but got the cure wrong. Reset DISABLE_NEWLINE_AUTO_RETURN in the new mode, not the old one. Otherwise the change isn't applied. Saves 48 bytes. (GitHub issue #372)
* | make: fix detection of target rulesRon Yorston2023-10-232-152/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The presence of an equal sign in an inline command on a target rule caused the line to be detected as a macro assignment. For example: target:; @echo a = $(a) Rearrange input parsing so target rules are detected before macro assignments. This is made more complex by having to allow for the ':=', '::=' and ':::=' assignment operators. (And for targets containing colons on Windows.) Costs 240-248 bytes.
* | win32: avoid terminal weirdness induced by Gradle?Ron Yorston2023-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | GitHub issue #372 reports that in certain circumstances (which I've been unable to reproduce) Gradle leaves the terminal in a state where linefeeds seem not to result in a carriage return. This *might* be because Gradle sets DISABLE_NEWLINE_AUTO_RETURN in the terminal mode. Reset DISABLE_NEWLINE_AUTO_RETURN to zero before the shell prompt is issued to see of this makes any difference. Costs 16-32 bytes.
* | make: permit Unix-style paths when setting MAKERon Yorston2023-10-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'make' applet follows POSIX requirements when setting the MAKE variable. However, it doesn't allow for the case where argv[0] is of a form like '/bin/make' but no corresponding executable exists. This can happen in busybox-w32 when '/bin/make' is interpreted as a reference to the 'make' applet. In this case set the MAKE variable to argv[0] and avoid issuing a warning. Setting MAKE to something that isn't a real executable is fine so long as it's only used by busybox-w32 applets. If it's used by external applications they may get confused. Adds 16-32 bytes. (GitHub issue #354)
* | win32: fix handling of relative pathsRon Yorston2023-10-041-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 548ec7045b (win32: interpret absolute paths as relative to %SYSTEMDRIVE%) introduced the function xabsolute_path() to make relative paths absolute. This is used in 'dkpg' and 'man' to avoid having to tinker with absolute paths from upstream. Unfortunately, it's too eager to use the relative path. This results in dpkg failing to install deb files with a relative path. Saves 32-48 bytes. (GitHub issue #371)
* | sort: add support for sorting version stringsRon Yorston2023-10-015-1/+69
| | | | | | | | | | | | | | | | | | | | | | Add an implementation of strverscmp from musl so that the 'sort -V' option works. Add '-V' to the trivial usage message. Costs 248-256 bytes. (GitHub issue #370)
* | ash: add options to control globbing of hidden filesRon Yorston2023-09-208-18/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add shell options: - 'nohiddenglob' excludes files with the hidden attribute from globbing - 'nohidsysglob' excludes files with the hidden and system attributes from globbing If both options are enabled 'nohiddenglob' takes precedence. These options also affect tab completion. Files that are hidden because they start with a period aren't affected (unless they also have the hidden attribute). Costs 160-208 bytes. (GitHub issue #367)
* | win32: missing support for "app exec link" reparse pointsRon Yorston2023-09-181-1/+2
| | | | | | | | | | | | | | | | | | | | Commit 603af9bb9 (win32: support "app exec link" reparse points) added support for IO_REPARSE_TAG_APPEXECLINK reparse points by pretending they're symbolic links. One change was missed, in the implementation of dirent. Costs 16 bytes.
* | Typo in README.mdRon Yorston2023-09-151-2/+2
| |
* | win32: include our manifests in default configurationsRon Yorston2023-09-158-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | The default configurations now include the provided standard or UTF-8 manifest. This works best if the build toolchain doesn't provide a default manifest (which Fedora and w64devkit don't, by default). If the toolchain does have a default manifest some bloat will result. (GitHub issue #366)
* | win32: improved support for manifestsRon Yorston2023-09-1410-8/+89
| | | | | | | | | | | | | | | | | | | | The UTF-8 manifest has been updated to include features from the standard application manifest. Include a copy of the standard application manifest for toolchains that don't provide one. (GitHub issue #366)
* | win32: convert exit codesRon Yorston2023-09-146-22/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two utility functions to convert Windows process exit codes. - exit_code_to_wait_status() converts to a POSIX wait status. This is used in ash and the implementations of system(3) and mingw_wait3(). - exit_code_to_posix() converts to a POSIX exit code. (Not that POSIX has much to say about them.) As a result it's possible for more applets to report when child processes are killed as if by a signal. 'time', 'drop' and 'su -W', for example. Adds 64-80 bytes.
* | ash: fix signal handlingRon Yorston2023-09-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 89aa9d783 (win32: changes to signal handling) caused a regression: 'httpd -f' could no longer be interrupted by Ctrl-C. The specific issue is the use of exit(2) to replace raise(3) in raise_interrupt(). This change was made so the shell would return the expected exit code of 130 rather than the default code of 3 which Windows uses when a signal with SIG_DFL disposition is caught. The problem can be avoided by calling _exit(2) instead. A call to fflush_all() has also been added, as _exit(2) doesn't do that. (GitHub issue #365)
* | make: return non-zero exit status when a command failsRon Yorston2023-09-123-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a build command returned a non-zero exit status 'make' reported a warning and returned an exit code of zero. This was due to the misuse of the status returned by system(3). As the man page says: the return value is a "wait status" that can be examined using the macros described in waitpid(2). (i.e., WIFEXITED(), WEXITSTATUS(), and so on). Use the error() function to correctly report the problem on stderr and return an exit status of 2. Some additional changes in the same area: - When a target is removed report the diagnostic on stderr, as required by POSIX. - When a build command receives a signal GNU make removes the target. bmake doesn't and it isn't required by POSIX. Implement this as an extension. - Expand the error message when a build command fails so it includes the exit status or signal number, as obtained from the value returned by system(3). - Alter the WIN32 implementation of system(3) to handle exit codes which represent termination as if by a signal. Adds 200-240 bytes. (GitHub issue #354)
* | make: avoid more warningsRon Yorston2023-09-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tracking of progress introduced in commit fb4be267c (make: fixes to warning messages) failed to account for runs with the '-t' or '-n' options. Without this the following makefile: dummy_target: dummy_rule dummy_rule: @: issues the warning 'make: nothing to be done for dummy_target' when run with '-t' or '-n' and no 'dummy_rule' file present. (GitHub issue #354)
* | win32: UTF8_INPUT: fix combining of some surrogates pairsAvi Halachmi (:avih)2023-09-111-1/+1
| | | | | | | | | | | | | | | | | | The construction of a codepoint from a surrogates pair was incorrect when the result should have had the 0x10000 bit unset, due to logical "|" instead of arithmetic "+" of 0x10000 (so the 0x10000 bit was set incorrectly when the result should have been U+[1]{0,2,4...C,E}XXXX). For instance: typing or pasting U+20000 𠀀
* | ash: initialize basepf.buf in ash (2)Ron Yorston2023-08-311-1/+1
| | | | | | | | | | | | Upstream commit ed4a24dfd (ash: initialize basepf.buf in ash) zeroes out the memory allocated for basepf.buf. busybox-w32 has a copy of this code early in ash_main(). Do the same there.
* | Merge branch 'busybox' into mergeRon Yorston2023-08-312-4/+18
|\|
| * tsort: avoid use-after-freeRon Yorston2023-08-311-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the input data contained a cycle it was possible for tsort to attempt to access freed nodes. This sometimes resulted in the test case 'echo a b b a | tsort' crashing. Don't free nodes when they're removed from the graph. function old new delta tsort_main 621 596 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25) Total: -25 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: initialize basepf.buf in ashzhuyan2023-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I planned to print the command in read_line_input, I found that after the system started, the command printed for the first time was always garbled. After analysis, it is found that in the init() function of ash, the variable basepf.buf is not initialized after applying for memory, resulting in garbled initial data. Then assign it to the global variable g_parsefile->buf in ash.c, and then pass g_parsefile->buf to the parameter command of the function read_line_input in the function preadfd(), and finally cause it to be garbled when the command is printed by read_line_input. The call stack is as follows: #0 read_line_input (st=0xb6fff220, prompt=0xb6ffc910 "\\[\\033[32m\\]\\h \\w\\[\\033[m\\] \\$ ", command=command@entry=0xb6ffc230 "P\325\377\266P\325\377\266", maxsize=maxsize@entry=1024) at libbb/lineedit.c:2461 #1 0x0043ef8c in preadfd () at shell/ash.c:10812 #2 preadbuffer () at shell/ash.c:10914 #3 pgetc () at shell/ash.c:10997 #4 0x00440c20 in pgetc_eatbnl () at shell/ash.c:11039 #5 0x00440cbc in xxreadtoken () at shell/ash.c:13157 #6 0x00440f40 in readtoken () at shell/ash.c:13268 #7 0x00441234 in list (nlflag=nlflag@entry=1) at shell/ash.c:11782 #8 0x004420e8 in parsecmd (interact=<optimized out>) at shell/ash.c:13344 #9 0x00442c34 in cmdloop (top=top@entry=1) at shell/ash.c:13549 #10 0x00444e4c in ash_main (argc=<optimized out>, argv=0x444e4c <ash_main+1328>) at shell/ash.c:14747 #11 0x00407954 in run_applet_no_and_exit (applet_no=9, name=<optimized out>, argv=0xbefffd34) at libbb/appletlib.c:1024 #12 0x00407b68 in run_applet_and_exit (name=0xbefffe56 "ash", argv=0x9) at libbb/appletlib.c:1047 #13 0x00407f88 in main (argc=<optimized out>, argv=0xbefffd34) at libbb/appletlib.c:1181 Fixes: 82dd14a510ca ("ash: use CONFIG_FEATURE_EDITING_MAX_LEN") Signed-off-by: zhuyan <zhuyan34@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Update README.mdRon Yorston2023-08-311-1/+1
| |
* | ash: changes to login shell functionalityRon Yorston2023-08-302-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream BusyBox supports the usual Unix functionality where the login process adds a '-' prefix to the shell's argv[0]. Since busybox-w32 doesn't have a login process this serves no purpose and can be removed. Instead it would be useful to have a way to invoke a login shell without requiring any arguments. Advantages would be: - easier to configure busybox-w32 'ash' as the SSH login shell; - double clicking on a shell binary could start a login shell. Add 'lash' as an alias for 'ash' which starts a login shell without requiring the '-l' option. Saves 16 bytes.
* | ps: increase length of 'comm' fieldRon Yorston2023-08-292-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Linux the command name associated with a process (as can be obtained from '/proc/<PID>/comm') is truncated to 16 characters. Thus upstream BusyBox only allows 16 characters for the 'comm' field in 'ps'. There's no need for such a constraint in busybox-w32. Moreover, the command name is used for the full command line ('args' field) in most cases. This field is allowed to be rather long in 'ps' so it's not expected to be truncated. Still, to avoid diverging too much from upstream it's best to have some measure of truncation. Increase the allowed length of the command name to 32 characters. Adds 16 bytes. (GitHub issue #358)
* | win32: UCRT: avoid I64 printf format warningsAvi Halachmi (:avih)2023-08-281-2/+3
| | | | | | | | | | | | | | | | Builds without warnings on: mingw-msvcrt gcc 13.2 i686/x86-64 (w64devkit). mingw-ucrt gcc 13.1/13.2 i686/x86-64 (winlibs). Where previously both the ucrt builds warned about I64.
* | libbb: fix #!/bin/busyboxRon Yorston2023-08-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3476fb9f4c (ps: display interpreted script name in comm column) required the applet start up code to detect the index of the script in a shebang command line. When a script starts with '#!/bin/busybox' the argument list is shifted in busybox_main() but the script index wasn't adjusted to match. This caused the command to fail. Make the proper adjustment. Add 16 bytes. (GitHub issue #357)
* | Merge pull request #355 from avih/utf8-output-speedupRon Yorston2023-08-251-2/+8
|\ \ | | | | | | win32: UTF8_OUTPUT: speedup for big outputs
| * | win32: UTF8_OUTPUT: speedup for big outputsAvi Halachmi (:avih)2023-08-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the native Windows console, writeCon_utf8 which converts a stream of UTF8 into console output is about 1.4x slower for big unicode writes than the native fwrite (e.g. when the console codepage is UTF8), which is not too bad. However, newer versions of conhost are quicker, e.g. OpenConsole.exe (which is conhost) which ships with the Windows terminal is about 4x faster than the native conhost in processing (unicode?) input. And when conhost can process inputs much quicker, it turned out that fwrite throughput was nearly 3x better than writeCon_utf8. Luckily, this turned out to be mainly due to the internal 256 wide chars buffer which writeCon_utf8 uses, and that with 4096 buffer it becomes only ~ 10% slower than fwrite, which is much better. However, making the console window very small such that it needs to spend very little time on rendering, makes it apparent that there's still a difference - writeCon_utf8 is about 30% slower than fwrite, but that's still not bad, and that's also an uncommon use case. So this commit increases the buffer, and also allocates it dynamically (once) to avoid abusing the stck with additional 8K in one call.
* | | make: fixes to warning messagesRon Yorston2023-08-251-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to POSIX only fatal diagnostic messages should be written to stderr. Arrange for warning() to write to stdout. pdpmake was rather too prolific in generating 'nothing to be done for XXX' messages. GNU make only issues the equivalent message for top-level targets and only if nothing at all was (or would have been) done. bmake doesn't seem to have such a message. Follow the practice of GNU make. This requires more intensive tracking of the actions taken while the make is in progress. Costs 16 bytes. (GitHub issue #354)
* | | make: fix .DEFAULT for prerequisiteRon Yorston2023-08-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4b65e7d9 (Fixes to inference rules) set the N_TARGET flag for prerequisites being built recursively. That wasn't necessary for the issue at hand and it lead to other problems. Undo that part of commit 4b65e7d9. (GitHub issue #354)
* | | Add test for .DEFAULT rule for prerequisiteRon Yorston2023-08-241-0/+7
| | | | | | | | | | | | Add a test for the problem reported in -w32 GitHub issue #354.
* | | make: fix POSIX buildRon Yorston2023-08-242-2/+16
|/ / | | | | | | | | | | | | | | If upstream BusyBox had a 'make' applet a native build with it enabled should match the corresponding build from the busybox-w32 source. Make it so.
* | make: allow targets of the form c:/pathRon Yorston2023-08-231-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of target rules was too simplistic to allow targets of the form c:/path. Allow such targets as a non-POSIX extension. Also add a 'windows' pragma to allow such targets in POSIX mode. This additionally requires the use of the 'target_name' pragma to permit slashes in target names. This change *doesn't* allow targets of the form c:path, but it's probably not wise to use them anyway. Costs 40-80 bytes. (GitHub issue #353)
* | win32: replace readlink(2)Ron Yorston2023-08-213-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows implementation of readlink(2) has caused problems in the past. As, for example, with commit c29dc205d2 (win32: fix implementation of readlink(2)). Most uses of readlink(2) in BusyBox are actually calls to the (considerably more convenient) library function xmalloc_readlink(). Implement a Windows version of that and used it instead of readlink(2). This improves the handling of symbolic links (and similar reparse points) in CJK and UTF-8 code pages. Saves 48-80 bytes.
* | ash: detect console state on shell start upnoconsole2Ron Yorston2023-08-203-15/+31
| | | | | | | | | | | | | | | | | | | | | | Set 'noconsole' to match the actual state of the console (normal/ iconified) when the shell is started. Thus ShowWindow() will only be called if the actual state differs from the default or user defined state. Costs 20-24 bytes. (GitHub issue #325)
* | testsuite: skip some tests in native buildRon Yorston2023-08-192-0/+6
| | | | | | | | | | The testsuite includes some Windows-specific tests. Exclude these when running a test on a native build to avoid upsetting the results.
* | ash: detect native Windows environment on WineFRP-5181-g5c1a3b00eRon Yorston2023-08-171-2/+18
| | | | | | | | | | | | | | | | | | | | | | The shell detected a native Windows environment by checking for a mixed-case 'Path' environment variable. This has always worked on Windows but recent versions of Wine have a 'PATH' environment variable. Check also for 'ComSpec'. Costs 24-48 bytes.