<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/win32/Kbuild, branch join2</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=join2</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=join2'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2026-04-16T09:42:13+00:00</updated>
<entry>
<title>win32: switch to new fnmatch2.c</title>
<updated>2026-04-16T09:42:13+00:00</updated>
<author>
<name>Avi Halachmi (:avih)</name>
<email>avihpit@yahoo.com</email>
</author>
<published>2026-04-14T00:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=feca895aa0e76d1ec89fa11ce673746aefc29d64'/>
<id>urn:sha1:feca895aa0e76d1ec89fa11ce673746aefc29d64</id>
<content type='text'>
win32/fnmatch.c has several issues:
- *[* doesn't match foo[bar - but it should (non-special '[').
- FMN_CASEFOLD is not handled corrrectly. It does tolower on pattern
  and string, which doesn't always work, e.g. *[@-[]* correctly
  matches '@', A-Z, and '[', but as case-insensitive it only matches
  '@' and '[' (tolower on the string breaks all the alpha matches):
    set -o nocaseglob; echo *[@-[]*
    set +o nocaseglob; echo *[@-[]*
- According to posix, negative bracket range, like [z-a], should be
  either invalid or empty, but instead it matches only 'z'.
- There could be more issues hiding - the code is not easy to follow.
- It's exponential time in the number of '*' in pattern.

This commit adds win32/fnmatch2.c and disables win32/fnmatch.c
(currently using "#if 0"), but still keeps it in the tree.

The new implementation is written from scratch, non-recursive and
linear time, improves POSIX compliance, and hopefully more readable
and fixable if needed. Also, it's about half the size at the binary
(saves 908 bytes in x64).

See implementation details and choices as comment at fnmatch2.c .
</content>
</entry>
<entry>
<title>win32: add actype/isactype instead of match_class</title>
<updated>2026-04-16T09:42:13+00:00</updated>
<author>
<name>Avi Halachmi (:avih)</name>
<email>avihpit@yahoo.com</email>
</author>
<published>2026-03-25T13:12:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b9a1b0db1d7d455278611efb1d63c96675b15b67'/>
<id>urn:sha1:b9a1b0db1d7d455278611efb1d63c96675b15b67</id>
<content type='text'>
TL;DR:
- Add actype/isactype, like POSIX wctype/iswctype, but single-byte.
- actype is a renamed match_class, isactype is yet unused.
- This can be used in win32/{fnmatch,regcomp}.c, and elsewhere - tr.c.

Details:

win32/fnmatch.c and win32/regcomp.c used match_class to get char-class
index for char-class name, which is then used in a switch statement to
choose the single-byte isupper, isalpha, etc.

This is analogous to the POSIX wctype/iswctype, except that wctype
returns 0 for unknown name but match_class returned -1.

This commit renames match_class to actype:
- Returns 0 for unknown name, which at the enum is a new CCLASS_NONE.
- Return type is actype_t (still enum), analogous to wctype_t.
- Rename match_class* to actype* at fname/kbuild/includes/usage.

Both fnmatch.c and regcomp.c don't care whether unknown name in
match_class/actype is -1 (match_class) or 0 (actype). All they care
about is the values at each "case".

Also implemented, but not yet used:
- isactype(c, t):      test whether char c is of type t.
- isactype_not0(c, t): when t is not-0 - same as isactype but faster.
- actail(s, int*):     test for "NAME:]..." without temporary buffer.

Note that this commit focuses on exposing a useful API rather than
performance. Future commits may improve actype/isactype performance.
</content>
</entry>
<entry>
<title>flock: enable by default</title>
<updated>2025-10-09T10:10:40+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-10-09T10:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=41bab273afa7cc9f773666622eb888aee8a340ac'/>
<id>urn:sha1:41bab273afa7cc9f773666622eb888aee8a340ac</id>
<content type='text'>
Use the Gnulib implementation of flock(2) to allow the flock
applet to be enabled.

Costs 900-984 bytes.

(GitHub issue #528)
</content>
</entry>
<entry>
<title>win32: use RtlGenRandom for /dev/urandom</title>
<updated>2025-10-09T06:49:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-10-09T06:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=255e7ea4e2a0e3d28c0abf2750f42713eff711d7'/>
<id>urn:sha1:255e7ea4e2a0e3d28c0abf2750f42713eff711d7</id>
<content type='text'>
Use the (somewhat ancient) Microsoft RtlGenRandom() function to
provide random data for /dev/urandom.

Saves 176-240 bytes.

(GitHub issue #519)
</content>
</entry>
<entry>
<title>win32: import dirname(3) from mingw-w64</title>
<updated>2024-01-30T14:50:08+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-01-30T14:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a750640a87ff0bad6e59b534264dddeaf8c6923b'/>
<id>urn:sha1:a750640a87ff0bad6e59b534264dddeaf8c6923b</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>sort: add support for sorting version strings</title>
<updated>2023-10-01T06:06:19+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-10-01T06:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1942077cade6374a7c37fcdcf6cbf55dd52e13c4'/>
<id>urn:sha1:1942077cade6374a7c37fcdcf6cbf55dd52e13c4</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>make: fix POSIX build</title>
<updated>2023-08-24T14:02:14+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-08-24T14:02:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=8d70faa33f782504838d0da8892f978d17adcdec'/>
<id>urn:sha1:8d70faa33f782504838d0da8892f978d17adcdec</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>make: allow building as pdpmake only</title>
<updated>2023-01-24T08:58:39+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-01-24T08:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=67c3e4c03f1dab1f840a81c2ce438d47ef8389f5'/>
<id>urn:sha1:67c3e4c03f1dab1f840a81c2ce438d47ef8389f5</id>
<content type='text'>
Commit f261d2d27 (make: make + sh configuration) added 'pdpmake'
as an alias for 'make'.

It should have been possible to include 'pdpmake' in a build without
also including 'make'.  Adjust the build configuration so this works
as intended.
</content>
</entry>
<entry>
<title>make: new applet</title>
<updated>2022-08-01T11:51:37+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-08-01T11:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=67a630e5af1ace1dd528ea9652ee69102b3136c3'/>
<id>urn:sha1:67a630e5af1ace1dd528ea9652ee69102b3136c3</id>
<content type='text'>
This is an experimental implementation of make for busybox-w32,
based on my public domain POSIX make:

   https://frippery.org/make/

(GitHub issue #44)
</content>
</entry>
<entry>
<title>win32: don't affect POSIX build</title>
<updated>2021-09-17T15:57:16+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-09-17T15:57:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9428d54ff38e2cbc8d6977fb3ab67edab91fd350'/>
<id>urn:sha1:9428d54ff38e2cbc8d6977fb3ab67edab91fd350</id>
<content type='text'>
</content>
</entry>
</feed>
