<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/applets/applet_tables.c, branch cron_changes</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cron_changes</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cron_changes'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2021-05-14T07:17:12+00:00</updated>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2021-05-14T07:17:12+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-05-14T07:17:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a3f5a1b7f4275f713acf22f534f95c0da8392e53'/>
<id>urn:sha1:a3f5a1b7f4275f713acf22f534f95c0da8392e53</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix "warning array subscript has type 'char'"</title>
<updated>2021-04-14T17:12:43+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-04-14T17:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1a45b2ccea94b0fc123798f276a0801413597880'/>
<id>urn:sha1:1a45b2ccea94b0fc123798f276a0801413597880</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>applet_tables: simulate force-renaming on Windows</title>
<updated>2021-02-21T09:51:19+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-05-02T11:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=174a145dcdf098d703ce31e0269fdc902b2a86f6'/>
<id>urn:sha1:174a145dcdf098d703ce31e0269fdc902b2a86f6</id>
<content type='text'>
On Windows, you cannot `rename(source, target)` if `target` exists or if
a file handle to `source` is still open.

This patch is similar in spirit to 02958a6ee (kbuild: simulate
force-renaming on Windows, 2017-02-01).

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Fixes for Hurd build</title>
<updated>2020-12-17T10:22:44+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-12-17T10:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=072313162870e9675c3e6f346a804a324a907f93'/>
<id>urn:sha1:072313162870e9675c3e6f346a804a324a907f93</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>build system: prevent duplicate applet names</title>
<updated>2018-11-27T09:47:06+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-11-25T11:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=2d217799e8f23514ad3be6a951aa928c265bc6a4'/>
<id>urn:sha1:2d217799e8f23514ad3be6a951aa928c265bc6a4</id>
<content type='text'>
The embedded script feature makes it easier to create applets with
duplicate names.  Currently in such cases the build succeeds but
the resulting executable doesn't work as the developer intended.

Catch duplicate names when the applet tables are being generated
and make the build fail.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>build system: fix parallel building issue</title>
<updated>2018-04-13T23:55:51+00:00</updated>
<author>
<name>Michael Olbrich</name>
<email>m.olbrich@pengutronix.de</email>
</author>
<published>2018-04-12T08:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=43dd0062229170747dcbee0a2a87b8e5ee2f09d6'/>
<id>urn:sha1:43dd0062229170747dcbee0a2a87b8e5ee2f09d6</id>
<content type='text'>
The files generated by the include/config/MARKER target are in the
dependency list for applets/applet_tables.
If applets/applet_tables is created first during applets_dir then it will
be created again later as part of $(busybox-dirs).
As a result include/applet_tables.h is created again. This time while other
build commands may need it.

Let applets_dir depend on include/config/MARKER to avoid this particular
race condition and create the header files atomically to ensure that the
compiler never sees incomplete files.

Signed-off-by: Michael Olbrich &lt;m.olbrich@pengutronix.de&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>build system: always rewrite NUM_APPLETS.h</title>
<updated>2016-08-23T18:21:36+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-08-23T18:21:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563'/>
<id>urn:sha1:0dddbc1a59795a77679d8c5ef48a2795cb470563</id>
<content type='text'>
Conditional rewrite can keep NUM_APPLETS.h mtime old,
this causes make to try to regenerate it at every invocation.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>config: disentangle PREFER_APPLETS from SH_STANDALONE and SH_NOFORK</title>
<updated>2016-07-22T16:48:38+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-07-22T16:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0fb0045aa9261be1dda49dfdfb95cbc585402a8b'/>
<id>urn:sha1:0fb0045aa9261be1dda49dfdfb95cbc585402a8b</id>
<content type='text'>
On user request.
I thought enabling/disabling them all together is more consistent.
Evidently, some people do want them to be separately selectable.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>build system: finer-grained selection of search speedup table.</title>
<updated>2016-04-02T13:18:26+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-04-02T13:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=dd02a05e082b96d76707964179921107cd43cdd8'/>
<id>urn:sha1:dd02a05e082b96d76707964179921107cd43cdd8</id>
<content type='text'>
KNOWN_APPNAME_OFFSETS=8 versus KNOWN_APPNAME_OFFSETS=0:

function                                             old     new   delta
find_applet_by_name                                   55     136     +81
applet_nameofs                                         -      14     +14
run_applet_and_exit                                  757     758      +1

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>applet_tables: save space by removing applet name offsets</title>
<updated>2016-03-29T22:44:11+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2016-03-29T22:42:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=610c4c385b38280c7bde7a48d95ec019cbfe1ab4'/>
<id>urn:sha1:610c4c385b38280c7bde7a48d95ec019cbfe1ab4</id>
<content type='text'>
The array applet_nameofs consumes two bytes per applet.  It encodes

   nofork/noexec flags
   suid flags
   the offset of the applet name in the applet_name string

Change the applet_table build tool to store the flags in two separate
arrays (applet_flags and applet_suid).  Replace applet_nameofs[] with a
smaller version that only stores a limited number of offsets.

This requires changes to the macros APPLET_IS_NOFORK, APPLET_IS_NOEXEC
and APPLET_SUID.

   According to Valgrind the original find_applet_by_name required
   353 cycles per call, averaged over all names.  Adjusting the number
   of known offsets allows space to be traded off against execution time:

      KNOWN_OFFSETS     cycles     bytes (wrt KNOWN_OFFSETS = 0)

           0             9057        -
           2             4604       32
           4             2407       75
           8             1342       98
          16              908      130
          32              884      194

   This patch uses KNOWN_OFFSETS = 8.

v2:
   Remove some dead code from the applet_table tool;
   Treat the applet in the middle of the table as a special case.

v3:
   Use the middle applet to adjust the start of the linear search as
   well as the last applet found.

v4:
   Use an augmented linear search in find_applet_by_name.
   Drop the special treatment of the middle name from get_applet_name:
   most of the advantage now derives from the last stored value.

v5:
   Don't store index in applet_nameofs, it can be calculated.

v6:
   Tweaks by Denys

function                                             old     new   delta
find_applet_by_name                                   25     125    +100
applet_suid                                            -      92     +92
run_applet_no_and_exit                               452     460      +8
run_applet_and_exit                                  695     697      +2
applet_name_compare                                   31       -     -31
applet_nameofs                                       734      14    -720
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 202/-751)         Total: -549 bytes
   text       data        bss        dec        hex    filename
 925464        906      17160     943530      e65aa    busybox_old
 924915        906      17160     942981      e6385    busybox_unstripped

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