aboutsummaryrefslogtreecommitdiff
path: root/coreutils/expr.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-02-07win32: avoid console windows from CGI scriptsRon Yorston1-1/+1
When httpd is run in the background its processes are detached from the console. CGI scripts could create subprocesses which needed a console, resulting in annoying console windows appearing. Prevent this by changing the creation flags for CGI scripts to CREATE_NO_WINDOW.
2024-02-03win32: update sample script for release buildRon Yorston2-36/+67
Update the mkrelease script to include cross-compilation of the Windows on ARM binary on Linux using llvm-mingw.
2024-02-02win32: stat(1) requires find_mount_point()Ron Yorston1-0/+1
In the Microsoft Windows build stat(1) requires find_mount_point() from libbb. This won't be available unless df(1) is also enabled. Add a dependency so stat(1) can be built without df(1). This may result in find_mount_point() being compiled needlessly in some upstream builds, but we can live with that. (GitHub issue #385)
2024-02-02win32: rearrange applet override handlingRon Yorston4-36/+38
- Rename some functions to be more meaningful. - Adjust conditional compilation to clarify which code is required for 'standalone shell' and 'exec prefers applets' settings. This shouldn't result in any change to the behaviour or size of default builds.
2024-01-31win32: UTF8_OUTPUT: recover quicker from bad byteAvi Halachmi (:avih)1-12/+19
When an unexpected value is detected in UTF-8, we should print the placeholder codepoint, and then recover whenever we detect a value which is valid for starting a new UTF-8 codepoint (including ASCII7). However, previously, we only tested recovery at the bytes following the unexpected one, and so if the first unexpected value was also valid for a new codepoint, then didn't rcover it. Now we check for recovery from the first unexpected byte, which, if recoverable, requires both placeholder printout and recovery, so the recovery "unwinding" is modified a bit to allow placeholder. Example of of a sequence which now recovers quicker than before: (where UTF-8 for U+1F600 "😀" is: 0xF0 0x9F 0x98 0x80) printf "\xF0\xF0\x9F\x98\x80A" Previously: ?A Now: ?😀A
2024-01-30win32: import dirname(3) from mingw-w64Ron Yorston2-0/+288
The mingw-w64 project has updated its implementation of dirname(3). In some circumstances the new version doesn't preserve the type of the user-supplied top-level directory separator. As a result of this the dirname-handles-root test case failed. Import the new implementation and tweak it to preserve the type of the separator. This only affects mingw-w64 versions 12 and above. Currently only the aarch64 build using llvm-mingw is affected.
2024-01-30ls: support NO_COLOR environment variableRon Yorston1-0/+5
If the NO_COLOR environment variable is set and is not empty 'ls' won't output ANSI colour codes. This is an alternative to the existing approach of setting 'LS_COLORS=none'. See https://no-color.org/. Costs 24-32 bytes. (GitHub issue #382)
2024-01-24win32: avoid invalid freeRon Yorston1-3/+5
In external_exists() in appletlib.c it's necessary to take a copy of the pointer to the allocated variable path1 so it can be freed: find_executable() will change its value.
2024-01-23win32: hardcode numeric value of MANIFEST resourceRon Yorston1-2/+3
It seems windres in llvm doesn't understand MANIFEST resources. Use the numeric value 24 instead.
2024-01-23Fix POSIX build in standalone shell modeRon Yorston3-4/+7
The conditional compilation to control standalone shell mode was incorrect when building for POSIX. This hadn't been noticed before as it had only been tested in the default configuration where standalone shell mode is disabled.
2024-01-21build system: try a different exception methodRon Yorston1-1/+1
Use -fsjls-exceptions with clang.
2024-01-21build system: actually detect lack of --warn-commonRon Yorston1-1/+7
Commit 992387539 (build system: more clang/llvm tweaks) falsely claimed that the lack of the --warn-common linker option was being detected. It wasn't, but it is now.
2024-01-21win32: add aarch64 to uname(2)Ron Yorston1-0/+3
For Windows on ARM we need to report the aarch64 processor architecture.
2024-01-21build system: improved handling of silent modeRon Yorston1-1/+8
The top-level makefile attempted to detect if make was being run in silent mode (-s option). It then turned off reporting of commands as they were run. There were false positives where unrelated 's' characters in the command line were detected as silent mode. Import the relevant section from the latest Linux build system to improve matters.
2024-01-21win32: update sample scriptRon Yorston1-15/+38
Update the mkprerelease script to include cross-compilation of the Windows on ARM binary on Linux using llvm-mingw.
2024-01-20build system: make compiler names configurableRon Yorston6-6/+48
The top-level Makefile hardcoded the host and cross compiler name to "gcc". Make it possible to set different values either on the command line (make CROSS_COMPILER=clang) or in the configuration file.
2024-01-19awk: fix segfault when compiled by clangRon Yorston1-0/+4
A 32-bit build of BusyBox using clang segfaulted in the test "awk assign while assign". Specifically, on line 7 of the test input where the adjustment of the L.v pointer when the Fields array was reallocated: L.v += Fields - old_Fields_ptr; was out by 4 bytes. Rearrange to code so both gcc and clang generate code that works. This patch has been submitted upstream. Until it's accepted there the new code is only used in builds for Windows.
2024-01-18ash: workaround environment issue in Windows on ARMRon Yorston1-1/+2
The environment is handled differently in ARM64 Windows. Assignments to 'environ' result in a compiler error. Omit the offending code for now. NOFORK applets will cause a fork.