Skip to content

Conversation

t-a-k
Copy link
Contributor

@t-a-k t-a-k commented Sep 12, 2025

This patch will define I_STDCKDINT macro in config.h if C23 <stdckdint.h> is available.

This will complement the recently merged patch (0f2b1e6, GH #23503) to make the new code available to C23-compliant compilers, not only to GCC-compatible ones.


  • This set of changes requires a perldelta entry, and it is included.

This macro is defined in config.h if <stdckdint.h> is available,
and used in previously commited code
(0f2b1e6, GH Perl#23503).
@sisyphus
Copy link
Contributor

Looks good to me, on 32-bit and 64-bit gcc-15.2.0 builds on Windows 11.
A default build of Windows will specify the -std=c99 switch as part of ccflags - so I guess that will prevent most Windows users from defining I_STDCKDINT (in win32/config_H.gc) and i_stdckdint (in win32/config.c).

I build my windows perls without that repressive switch, so I get a perl built at the same level as the compiler's default (which is C23 in this case).
Perl's test suite passes all tests.
perl -V:i_stdckdint reports "defined", and I ran an Inline::C script that confirmed that the I_STDCKDINT symbol is defined at the XS level.

That's about it. Is there some other aspect that I should be looking at ?

@sisyphus
Copy link
Contributor

A default build of Windows will specify the -std=c99 switch as part of ccflags - so I guess that will prevent most Windows users from defining I_STDCKDINT (in win32/config_H.gc) and i_stdckdint (in win32/config.c).

No - I was wrong about that. A Windows perl built with gcc-15 can still access stdckint.h even if the C level is set to C99, so long as win32/config_H.gc and win32/config.gc have been edited to include the relevant definitions.

@khwilliamson khwilliamson merged commit d51aa1a into Perl:blead Sep 16, 2025
34 checks passed
@t-a-k t-a-k deleted the i_stdckdint branch September 17, 2025 16:08
@t-a-k
Copy link
Contributor Author

t-a-k commented Sep 17, 2025

@sisyphus Thank you for comments.
I think that config.gc's i_stdckdint should be undef as README.win32 seems to say that minimum supported GCC version is 3.4.5 which don't have <stdckdint.h>. config_sh.PL could be modified to tweak this depending on detected GCC version, but unfortunately I don't have Win32 test environment.

@sisyphus
Copy link
Contributor

sisyphus commented Sep 18, 2025 via email

sisyphus added a commit to sisyphus/perl5 that referenced this pull request Sep 28, 2025
…atable && functional.

For more info and context, see:
Perl#23703
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.

3 participants