Skip to content

embed.pl: Fix BBC build failures #24196, #24197#24200

Open
khwilliamson wants to merge 2 commits intoPerl:bleadfrom
khwilliamson:fix_longs
Open

embed.pl: Fix BBC build failures #24196, #24197#24200
khwilliamson wants to merge 2 commits intoPerl:bleadfrom
khwilliamson:fix_longs

Conversation

@khwilliamson
Copy link
Contributor

Fixes #24196
Fixes #24197

This bug stemmed from a C preprocessor nuance that I was unaware of. It
only happened on unthreaded builds and only affected functions that have
a single argument, the thread context, so that on unthreaded builds,
these have 0 parameters. The preprocessor dropped the parens indicating
there is an argument list (empty), which led to compilation errors.
It does not do this if there is at least one argument besides the thread
context one.

The solution is to extend the use of a paradigm already in effect for
other situations, so that there is a placeholder argument for the thread
context that gets dropped. This is only defined on unthreaded builds.
It is cleaner to do this for unaffected functions as well, (those that
have an argument besides the thread context).

Threaded is unchanged.

  • This set of changes does not require a perldelta entry.

Fixes Perl#24196
Fixes Perl#24197

This bug stemmed from a C preprocessor nuance that I was unaware of.  It
only happened on unthreaded builds and only affected functions that have
a single argument, the thread context, so that on unthreaded builds,
these have 0 parameters.  The preprocessor dropped the parens indicating
there is an argument list (empty), which led to compilation errors.
It does not do this if there is at least one argument besides the thread
context one.

The solution is to extend the use of a paradigm already in effect for
other situations, so that there is a placeholder argument for the thread
context that gets dropped.  This is only defined on unthreaded builds.
It is cleaner to do this for unaffected functions as well, (those that
have an argument besides the thread context).

Threaded is unchanged.
On unthreaded builds, the elements changed by this commit are macros, so
a prototype is useless.  Simply #ifdef them to threaded only.
@jkeenan
Copy link
Contributor

jkeenan commented Feb 16, 2026

I installed a local branch derived from this p.r. and built an unthreaded perl on Linux. I was then able to install Sys::Ibam and Wifi::WpaCtrl against that perl.

[gh-24200-khwilliamson-fix_longs-20260216] 2020 $ ./bin/perl -Ilib -MSys::Ibam -MWifi::WpaCtrl -E 'say join "|" => ($Sys::Ibam::VERSION, $Wifi::WpaCtrl::VERSION, "hello world");'
0.05|0.02|hello world

So in terms of the original complaint, this DWIMs.

perlguts code should get additional eyeballs.

@jkeenan jkeenan requested review from tonycoz and xenu February 17, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BBC: Blead Breaks Wifi::WpaCtrl BBC: Blead Breaks Sys::Ibam

2 participants

Comments