<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/libbb, branch ucrt_hack</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=ucrt_hack</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=ucrt_hack'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2021-11-04T12:27:45+00:00</updated>
<entry>
<title>win32: move UCRT hack to process.c</title>
<updated>2021-11-04T12:27:45+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-11-04T12:27:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9e12622a8706a0d23a3ff8792773e73b0d6108b4'/>
<id>urn:sha1:9e12622a8706a0d23a3ff8792773e73b0d6108b4</id>
<content type='text'>
Only apply the UCRT hack if we're about to call spawnve() with
a non-NULL environment pointer.

Add the pid of the process to the name of the environment variable
to provide greater assurance that the environment will be changed.
</content>
</entry>
<entry>
<title>win32: UCRT environment hack</title>
<updated>2021-11-01T12:27:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-11-01T12:27:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=42a3e960faaff1458c7ca3c138d1847b1a104089'/>
<id>urn:sha1:42a3e960faaff1458c7ca3c138d1847b1a104089</id>
<content type='text'>
Commit 5b48ca53b (win32: pass NULL to spawnve, not environ) was an
attempt to fix a problem seen in busybox-w32 built against the UCRT
runtime.  It was effective for applets like 'time' which pass an
unmodified environment to their children but not the shell which
needs to alter the environment to include exported shell variables.

A peculiar feature of the problem was that it only manifested when
the BusyBox binary was run by GNU make.  Like the shell, make needs
to modify the environment passed to its children.  GNU make therefore
creates a new environment block which is passed to CreateProcess.
As was the case with the previous commit passing a NULL pointer
instead made the problem go away.

It was also noted that failures only occurred when the child program
was built against UCRT.  Whether make was linked against UCRT or
MVSCRT made no difference.

It appears that programs linked against UCRT are unable to handle
their parent passing a non-default environment block.  It also
appears that setting an environment variable early in program
execution perturbs the environment block sufficiently to avoid
the problem.  YMMV.

(GitHub issue #234)
</content>
</entry>
<entry>
<title>realpath: improved support for Windows paths</title>
<updated>2021-10-13T15:44:45+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-10-13T15:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4daf57b4fdc80422d6448c0a7914699fdedb95b8'/>
<id>urn:sha1:4daf57b4fdc80422d6448c0a7914699fdedb95b8</id>
<content type='text'>
Upstream commit 94eb1c4dc (libbb: better coreutils compatibility
for realpath) made some changes to xmalloc_realpath_coreutils().
This now needs to be updated to handle Windows paths.

- Expose the macro is_unc_path() and part of the recent change to
  bb_get_last_path_component_nostrip() as a separate funtion,
  get_last_slash();

- Convert a couple of errors relating to network filesystems to
  ENOENT;

- Adjust xmalloc_realpath_coreutils() to handle Windows directory
  separators, relative paths and UNC paths.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2021-10-13T13:37:51+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-10-13T13:37:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0ecf1aea459571b48dc68ddc2b7b9265740fa960'/>
<id>urn:sha1:0ecf1aea459571b48dc68ddc2b7b9265740fa960</id>
<content type='text'>
</content>
</entry>
<entry>
<title>win32: fix bb_get_last_path_component_nostrip()</title>
<updated>2021-10-13T13:21:18+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-10-13T13:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4859ddcb20616718efbea12c6bf8b27c469b68de'/>
<id>urn:sha1:4859ddcb20616718efbea12c6bf8b27c469b68de</id>
<content type='text'>
Finding the last component of a path didn't properly handle a
mixture of slashes and backslashes, paths relative to another
drive or bare UNC paths.  The following were incorrect:

   $ basename /dir\\file
   dir\file
   $ basename c:file
   c:file
   $ basename //HOST/share
   share

With this patch the results are now:

   $ basename /dir\\file
   file
   $ basename c:file
   file
   $ basename //HOST/share
   //HOST/share
</content>
</entry>
<entry>
<title>win32: rename is_absolute_path()</title>
<updated>2021-10-12T12:43:15+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-10-12T12:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b4b2b2c4fbba12561c5e988177bef699be306b26'/>
<id>urn:sha1:b4b2b2c4fbba12561c5e988177bef699be306b26</id>
<content type='text'>
As the comment pointed out is_absolute_path() was misnamed.  Rename
it to is_relative_path() and change the sense of all tests.
</content>
</entry>
<entry>
<title>config system: move some options closer to relevalnt tool subdirectories</title>
<updated>2021-10-12T11:23:29+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-10-12T11:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=94c78aa0b91f2150bd038866addf3d0ee69474a8'/>
<id>urn:sha1:94c78aa0b91f2150bd038866addf3d0ee69474a8</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: do not read user database for every prompt - only for those which need it</title>
<updated>2021-10-11T21:08:31+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-10-11T21:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=f4fcd74a6e3d5cd2ec44cd6ce90be8a0ed108467'/>
<id>urn:sha1:f4fcd74a6e3d5cd2ec44cd6ce90be8a0ed108467</id>
<content type='text'>
function                                             old     new   delta
get_user_strings                                       -      52     +52
get_homedir_or_NULL                                    -      23     +23
parse_and_put_prompt                                 823     838     +15
null_str                                               1       -      -1
complete_cmd_dir_file                                814     812      -2
deinit_S                                              51      42      -9
read_line_input                                     3059    3015     -44
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/3 up/down: 90/-56)             Total: 34 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: fix script's comm field if ENABLE_FEATURE_PREFER_APPLETS=y</title>
<updated>2021-10-11T16:44:00+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-10-11T16:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=5acf5e1f870fb5382556d4b434158f7d497893ca'/>
<id>urn:sha1:5acf5e1f870fb5382556d4b434158f7d497893ca</id>
<content type='text'>
function                                             old     new   delta
re_execed_comm                                         -      46     +46
main                                                  72      86     +14
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 60/0)               Total: 60 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: add NOINLINEs where code noticeably shrinks</title>
<updated>2021-10-10T11:50:53+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-10-10T11:50:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=53b2fdcdba4ced600da963147be425a21d0f6e53'/>
<id>urn:sha1:53b2fdcdba4ced600da963147be425a21d0f6e53</id>
<content type='text'>
function                                             old     new   delta
display                                               85    1463   +1378  -73 bytes
select_and_cluster                                     -    1088   +1088 -139 bytes
parse_reply                                            -     979    +979 -109 bytes
zbc_num_sqrt                                           -     632    +632 -191 bytes
show_bridge_port                                       -     585    +585  -56 bytes
sp_256_proj_point_add_8                                -     576    +576  -45 bytes
encode_then_append_var_plusminus                       -     554    +554 -118 bytes
read_mode_db                                           -     537    +537  -47 bytes
fbset_main                                          1331     747    -584
sp_256_ecc_mulmod_8                                 1157     536    -621
brctl_main                                          2189    1548    -641
expand_one_var                                      2544    1872    -672
zxc_vm_process                                      6412    5589    -823
send_queries                                        1813     725   -1088
recv_and_process_peer_pkt                           2245    1018   -1227
bb_dump_dump                                        1531      80   -1451
------------------------------------------------------------------------------
(add/remove: 7/0 grow/shrink: 1/8 up/down: 6329/-7107)       Total: -778 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
