pcre2test: detect setrlimit instead of hardcoding platform list#893
pcre2test: detect setrlimit instead of hardcoding platform list#893puffnfresh wants to merge 2 commits intoPCRE2Project:mainfrom
Conversation
Replace the growing platform preprocessor check for -S flag support with AC_CHECK_FUNCS/check_symbol_exists detection of setrlimit. This automatically handles any platform lacking setrlimit (WASI, VMS, etc.) without maintaining a manual list. Haiku and z/OS are kept as explicit exclusions because they provide setrlimit but don't support RLIMIT_STACK.
|
Thank you, there are several of these in pcre2test and pcre2grep which I would love to clear up. Much appreciated! I will have to do a little bit of platform checking testing before I merge, but in principle, this is good. |
|
Hi @puffnfresh. Thank you very much for this WASI fix! I would like to merge it. I have now had the chance to do some testing of my own. I pushed a small fix to your branch, excluding WIN32 as before. This may not be needed... but I have tried a few versions of MinGW, MSYS2, etc, and I'm nervous a regression is possible. Plus - the Secondly, I seem not to have permissions to push merge commits to your branch, so I can't update this PR with a merge from main. I would like to add the following to .HAVE_SETRLIMIT = is_unix and !is_mingw, |
NWilson
left a comment
There was a problem hiding this comment.
Needs merge with main, and build.zig update
Replace the growing platform preprocessor check for -S flag support with AC_CHECK_FUNCS/check_symbol_exists detection of setrlimit. This automatically handles any platform lacking setrlimit (WASI, VMS, etc.) without maintaining a manual list.
Haiku and z/OS are kept as explicit exclusions because they provide setrlimit but don't support RLIMIT_STACK.