in reply to Re^6: Socket::getaddrinfo and localized error messages on Windows
in thread Socket::getaddrinfo and localized error messages on Windows

If the system doesn't provide the getaddrinfo function it is emulated by the Socket module.

Yes, but in my recent Socket ticket, I found that d_getaddrinfo (and others) can be defined without causing any failure in a current blead built using the same Strawberry toolchain as built your StrawberryPerl-5.32.1.
If the same fix were to take care of your issue, then the Socket module remains unaltered, and you just need to create a PR that appropriately amends the perl source files win32/config.gc and win32/config_H.gc.

The proposal in that "recent socket ticket" of mine is something I plan to implement during the perl-5.37 development cycle after 5.36.0 has been released.
If you have some feedback on that proposal, I'd love to hear it.

First fix I'll be nagging about immediately after the release of perl-5.36.0 will be in relation to https://github.com/Perl/perl5/issues/18911#issuecomment-1107197299.
This also involves an alteration to Socket.pm - albeit a fairly innocuous one that merely restricts a section of code to mingw runtime versions less than 9.
Any feedback on those proposals are also welcome.
(It's "innocuous" in that the current perl source won't even compile unless mingw runtime version is less than 9. Your StrawberryPerl-5.32.1 toolchain has runtime version 6; latest runtime version is 10. )

For anyone who wants to build perl using a mingw-w64 tool chain that is significantly more up to date than that offered by Strawberry Perl, go to https://winlibs.com.
For the 64-bit builds of perl I currently have https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64msvcrt-10.0.0-r1.7z.
For the 32-bit builds of perl I currently have https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-10.0.0-msvcrt-r1/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64msvcrt-10.0.0-r1.7z.
But I see they've just released gcc-11.3.0 versions - to which I'll be switching later today.

Cheers,
Rob
  • Comment on Re^7: Socket::getaddrinfo and localized error messages on Windows

Replies are listed 'Best First'.
Re^8: Socket::getaddrinfo and localized error messages on Windows
by Yaribz (Beadle) on Apr 25, 2022 at 08:06 UTC

    Thanks for all this information, however the system getaddrinfo function is already used in my case (and in your case also I think ?).

    Indeed the error constants used aren't the ones defined for the emulated versions. Same for the error messages. Your message made me wonder if it was really the case, so I also added debug traces in Socket.pm to make sure of it.

    So I don't think your proposal (defining d_getaddrinfo and others) could change anything regarding the problem, but maybe I missed something or misunderstood ?

      So I don't think your proposal (defining d_getaddrinfo and others) could change anything regarding the problem

      Aaah ... yes ... I think that's right. As I noted at the end of my Socket bug report, the bug I reported there is in the config settings, not the Socket module.
      Sorry for the interference ... I'll leave you in peace to get on with it.

      Cheers,
      Rob
        Sorry for the interference ... I'll leave you in peace to get on with it.

        No interference at all, thanks a lot for taking a look at the problem !

        For the record I'm using a workaround similar to the one I have posted above. When I have some time I will try to take a closer look at the problem and try to find a real fix, but for now it seems to works.