-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix GH-19248: Use strerror_r instead of strerror in main #19251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: PHP-8.3
Are you sure you want to change the base?
Conversation
81f7547
to
469fc77
Compare
It will need more testing. Need to figure out how to actually test the posix variant to make sure that it all works. Also need to figure out if we even have all those errors covered so there is still a bit of work. |
469fc77
to
0323cbf
Compare
Ok so XSI variant (returning int) is used on FreeBSD and MacOS which is tested and showed an issue. I just fixed that. Another thing is Windows. The fact that I replaced |
I'm afraid that switching to |
0323cbf
to
477c1d1
Compare
Or on Windows it is going to use either FormatMessageW or strerror_s for compatibility with previous error messages. It also needs to accomodate for GNU and BSD versions of strerror_r returning different type. Closes phpGH-19251
Or on Windows it is going to use either FormatMessageW or strerror_s for compatibility with previous error messages. It also needs to accomodate for GNU and BSD versions of strerror_r returning different type. Closes phpGH-19251
477c1d1
to
b3fdac9
Compare
Or on Windows it is going to use either FormatMessageW or strerror_s for compatibility with previous error messages. It also needs to accomodate for GNU and BSD versions of strerror_r returning different type. Closes phpGH-19251
b3fdac9
to
d6b94ac
Compare
Ok I introduced a special |
This tries to use strerror_r in networking and stream code. It required some extending of php_socket_strerror and php_socket_error_str which is not exactly beautiful but can't think about much nicer way atm.